Sign in before continuing.
How to Apply Filters in VDB for RAG Chatbot
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3547016. -->
Reported by: [yijin928@163.com](https://www.drupal.org/user/3848766)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>
I’m integrating a Zilliz vector database with an AI-powered RAG chatbot. I have filterable attributes (e.g., <em>case studies</em>, <em>approaches</em>) stored as integers. When I query the VDB via the AI explorer, these attributes are returned, but I’m not sure how to pass filters into the query so that results are pre-filtered.
</p>
<p>
In short, I want to apply filters at query time so Zilliz returns only the filtered chunks.
</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Use Zilliz for AI search and connect an AI assistant with knowledge grounded in results from the VDB.<br>
Observe that filterable attributes are present in results but cannot be applied as query-time filters through the current interface.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>
Enable query-time filtering so the VDB returns only chunks matching selected attributes (e.g., <em>case studies</em>). Currently, the chatbot must post-filter results, which increases latency and requires fetching more chunks than necessary.
</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>I am not sure if I am able to complete these steps from my end. If so I'd love to know where I should start making the changes:</p>
<ul>
<li>Expose a filter input in the AI bot UI so users can choose attribute filters before running a search; or</li>
<li>Implement server-side filtering by passing filter expressions to the Zilliz VDB at query time.</li>
</ul>
issue