Skip to main content
Standard RAG search performs only question → vector similarity search. Dynamic filters first narrow scope by metadata then perform vector search, improving accuracy.

Example

Question: “Show me revenue trends from the Finance team’s 2024 reports”

How to Configure Filters

1

Define filter fields

Click “Filter Settings” at the top right of the Knowledge Base detail screen, then ”+ Add Filter” at the bottom left of the modal to define a filter field.Filters marked required show a * next to their name in the list on the left.
2

Choose extraction mode

Toggle Manual / AI at the top of the filter schema. Choosing AI reveals an AI model selector right below it. That model is shared by every filter’s AI extraction and AI description generation — it cannot be set per filter.
AI-mode results can be edited manually. The most efficient flow is bulk-extract with AI first, then fix only the errors.
3

Save

Click Save to save the filter schema. In AI mode, metadata is auto-extracted on subsequent file uploads.

Filter Type Details

Per-Type Limits

Each filter type has a fixed number of storage slots. Once they’re full, + Add Filter is disabled.
Multi Select and Glossary share the same slots. Create two Glossary filters and you can add at most two Multi Select filters.

Date Filter Input Format

Date filters accept varying precision:

Metadata State Display

At the far right of each file row, a filled fields / total filters badge is shown. The badge does not appear in a Knowledge Base with no filters defined. While AI extraction is running, the file shows an “Extracting” badge with a spinner instead of the count.
The same 1/3 can appear in different colors. Color is decided by whether required fields are satisfied, not by how many fields are filled — if a required field is empty, the badge is orange no matter how much else you filled in.
Files in Orange (Missing Required) state may be omitted from filter searches. Make sure to fill in required fields.

AI Auto-Extraction

Writing Extraction Hints

The extraction hint is the instruction the AI uses when extracting metadata values from file content. Examples of good extraction hints:
The AI analyzes the first ~4,000 characters of the file. The closer key information is to the beginning, the better extraction accuracy.

Running Extraction

If you don’t see an extract button, your extraction hints are empty. The toolbar then shows only the notice “Configure filters to extract metadata”. The extract button appears once you’ve written at least one extraction hint in AI mode or linked a Glossary filter.
If already-extracted files are part of your selection, a dialog asks how to handle them. The default re-extracts every selected file, which also replaces values you edited by hand. Choose Extract only missing (N) to skip files that already have values.

Filling Metadata by Folder Upload

Set a filter’s Folder mapping and folder names become metadata values when you upload a whole folder. No LLM call is involved, so values are exact — the fastest path for documents you already sorted into folders. Depth counts the top folder you picked as level 0, and everything under it starts at level 1.
  • Map a “Project number” filter to Folder level 1 and the value becomes 21hg001
  • Map a “Document type” filter to Folder level 2 and the value becomes Contracts
  • Number types keep only the digits found in the folder name; Multi Select stores the folder name as a single value

How Agents Use Filters

When you connect a KB with dynamic filters to an agent, auto-filtering happens through this flow.

Step Details

1

Inform the AI about filters

On agent start, the system reads the KB’s filter schema and appends filter hints to the tool description.For example, with a “Department” filter, the AI knows “I can filter this KB by department”.
2

Extract filter values from the question

When a user asks a question, the AI auto-extracts filter values from the content.
The AI only applies filters with high confidence. If filter values can’t be determined from the question, it falls back to standard vector search without filters.
3

Build the search filter

Extracted filter values are converted into a condition the search engine understands. With multiple values, only documents matching all of them (AND) survive.
4

Run filtered search

The search engine performs vector similarity search only on documents matching the filter conditions. Documents from other teams or years are excluded from search.
5

Generate the answer

Filtered relevant documents are passed to the AI to generate an accurate answer.

Tool Description vs. Per-Filter Agent Description

Two separate fields feed descriptions to the AI, and they do different jobs. The names look alike, so keep them apart.
The label at the top of the screen is “Tool Description” — the agent calls a Knowledge Base like a tool. Its helper text reads “Describe when the agent should search this knowledge base.”
Leave the tool description empty and the KB’s general description is used instead. AI auto-generation: Both fields have a generate button next to them — AI for the tool description, AI Generate for a filter’s agent description. The tool description is drafted from the KB name + description + file list + filter info, using whichever model is picked in the AI model selector under Filter Settings.
After changing the filter schema, regenerate the tool description. New filter info must be reflected there for the AI to use filters accurately.

Caveats

Yes. Files without values in fields marked Required are not included in results when searching with that filter condition. Look for orange badges and fill in values.
AI extraction analyzes about the first 4,000 characters of the document — if key information is in later sections, extraction can be inaccurate. Review results and edit manually as needed.
Adding a filter field leaves existing files’ values empty. Run bulk extraction in AI mode to populate the new field. Removing a field also removes that metadata.
Rather than adding too many filters to one Knowledge Base, consider splitting into separate Knowledge Bases if you need finer classification.