hey the AI chatbot, how can i make it filter data ...
# gooddata-cloud
r
hey the AI chatbot, how can i make it filter data based on WDF? For example if i'm interacting with it inside a child workspace which has a WDF applied, it should only run executions on that dataset
k
When you interact with the AI chatbot (such as GoodData's NLQ/AI features) inside a child workspace that has a Workspace Data Filter (WDF) applied, the filtering of data is handled automatically by the workspace context and the WDF configuration. Here’s how it works: - WDFs are enforced at the workspace level: When a WDF is set up for a child workspace, all data queries and executions (including those triggered by the AI chatbot) are automatically filtered according to the WDF settings. This means the chatbot will only have access to the subset of data allowed by the WDF, and any queries it runs will respect these restrictions. You do not need to add extra logic to the chatbot for WDF enforcement—this is managed by the GoodData platform itself[[Set Up Data Filters in Workspaces](https://www.gooddata.com/docs/cloud/workspaces/workspace-data-filters/#how-workspace-data-filters-work)]. - Dataset-level application: WDFs must be explicitly assigned to each dataset you want filtered. If a dataset is not mapped to the WDF, queries (including those from the chatbot) on that dataset will not be filtered. Make sure the WDF is enabled and mapped to the relevant datasets in your Logical Data Model (LDM)[[Assigning WDFs to Specific Datasets](https://www.gooddata.com/docs/cloud/workspaces/workspace-data-filters/#assigning-wdfs-to-specific-datasets)]. - Security and visibility: The WDF ensures that users (and by extension, the chatbot) in a child workspace can only see the data allowed by the filter. If the chatbot is used in a workspace with a WDF, it cannot access data outside the filter’s scope[[How Workspace Data Filters Work](https://www.gooddata.com/docs/cloud/workspaces/workspace-data-filters/#how-workspace-data-filters-work)]. Key steps to ensure correct filtering: 1. Define and apply the WDF in the parent workspace. 2. Assign the WDF value(s) to each child workspace. 3. Explicitly map the WDF to all relevant datasets in the LDM. 4. Use the chatbot in the context of the child workspace—no additional configuration is needed for the chatbot itself. Note: If you notice that the chatbot (or any dashboard filter) is showing more data than expected, double-check that the WDF is mapped to all necessary datasets. WDFs do not propagate automatically across datasets; each must be configured individually[[Community Slack Example](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1732051909396339?thread_ts=1732051909.396339&cid=C04S1MSLEAW)]. If you follow these steps, the AI chatbot will only run executions on the data allowed by the WDF in the child workspace.