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

On the Knowledge Base edit screen, click “Filter Settings” > ”+ Add Filter” to define a filter field.
2

Choose extraction mode

Toggle Manual / AI at the top of the filter schema.
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

Date Filter Input Format

Date filters accept varying precision:

Metadata State Display

In the file list, each file’s metadata state is shown as a color dot.
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


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 auto-adds filter hints to the agent 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 internally converted to a filter query the search engine understands.
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.

Agent Description and Filters

The agent description is the key signal that helps the AI agent decide when to use a Knowledge Base, and which filter to apply. AI auto-generation recommended: Click the auto-generate button next to the agent description field — the AI drafts the agent description based on the KB name + description + file list + filter info.
After changing the filter schema, regenerate the agent description. New filter info must be reflected in the agent description 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 dots 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.