{"versionId":"dafd87a4-d41b-4e9f-691b-08ddee6c19f6","articleId":"ec2f7c60-42fc-4ffa-2e5e-08ddd305412f","title":"File search","tags":["Working with files","All articles"],"content":"<html><head></head><body><p>File search considers whether any available <a href=\"https://help.thetaassist.ai/article/using-files-in-theta-assist\" target=\"_blank\" rel=\"noopener\" aria-invalid=\"true\">assistant files</a> can help your assistant answer your query.</p>\n<p>File search doesn’t look for exact word matches. Instead, numerical representations or “vectors” help the system grasp the meaning behind your words for better search results.</p>\n<p>When you review file search results you may see the same file repeated multiple times. Each result points to a result for your search in the attached file, and is allocated a relevance score. For example -&nbsp;</p>\n<p><img src=\"https://storage.faqbot.nz/prod/0d5220bc9ad14992d05108dccd460f35/files/pasted_image_article_file-search_4c3c4346-f911-4375-9b7f-ed93bf09c498.png\"></p>\n<p>This approach ensures results are comprehensive, and you don’t miss relevant information within the file.</p>\n<h2>When is file search used?</h2>\n<p>If an assistant has assistant files - uploaded or synchronised files, threads in memory, or web crawl results - then file search can be used to help the assistant respond.</p>\n<p>File search results are collapsed by default in a thread, and appear above your assistant answer.</p>\n<div><img src=\"https://storage.faqbot.nz/prod/0d5220bc9ad14992d05108dccd460f35/files/pasted_image_article_file-search_48c5e58d-0676-4223-b826-e6c7354ee4bd.png\"></div>\n<h2>How file\u202Fsearch works under the hood</h2>\n<ul type=\"disc\">\n<li>When you upload a document it’s\u202F<em>chunked</em>&nbsp;(≈\u202F800‑token slices with 400‑token overlap), embedded and stored in a vector‑store.&nbsp;</li>\n<li>At question time the assistant calls the&nbsp;<em>file</em><em>\u202F</em><em>search</em>&nbsp;tool, which runs a hybrid vector\u202F+\u202Fkeyword query and returns only the&nbsp;<em>top</em><em>\u202F</em><em>N</em>&nbsp;chunks (currently up to\u202F20) that score highest for that query.&nbsp;</li>\n<li>Those chunks—and nothing else—are injected into the model’s context. If a file never ranks in the top set, the model can’t “see” it and therefore can’t mention it.</li>\n</ul>\n<p>What that means:</p>\n<ul type=\"disc\">\n<li>The assistant never has the&nbsp;<em>full file set</em>&nbsp;in memory—only what file\u202Fsearch returns for that specific query.</li>\n<li>Default retrieval pulls&nbsp;<em>relevant snippets</em>, not an inventory.&nbsp;</li>\n</ul>\n<p>&nbsp;</p></body></html>","description":"","isMarkdown":false,"publishedOnUtc":"2025-09-10T01:52:03.6813114","modifiedOnUtc":"2025-08-04T03:16:07.7630678"}