How we compared search
Himring, LlamaIndex, and OpenAI file search each searched the same 19 public government files for the same 40 questions. We list each product's settings, the scoring rule, and the scripts below, so that you can check the figures or repeat the comparison yourself.
Results from November 8, 2026
Each search returned 10 results, and we scored those results exactly as the product returned them. The scorer counts an answer as missing when the product couldn't read the file that contains it, so 9 of the 11 answers that OpenAI file search missed are in files that it couldn't read. We will replace these figures with the results of the same comparison on the current release of Himring.
Answer first
- Himring
- 32 of 40
- LlamaIndex hybrid
- 29 of 40
- LlamaIndex vector
- 27 of 40
- OpenAI file search
- 26 of 40
Answer in the top 5
- Himring
- 40 of 40
- LlamaIndex hybrid
- 37 of 40
- LlamaIndex vector
- 35 of 40
- OpenAI file search
- 29 of 40
Answer missing from the top 10
- Himring
- 0 of 40
- LlamaIndex hybrid
- 1 of 40
- LlamaIndex vector
- 3 of 40
- OpenAI file search
- 11 of 40
Answer in a file that the product couldn't read
- Himring
- 0 of 40
- LlamaIndex hybrid
- 0 of 40
- LlamaIndex vector
- 0 of 40
- OpenAI file search
- 9 of 40
| Measure | Himring | LlamaIndex hybrid | LlamaIndex vector | OpenAI file search |
|---|---|---|---|---|
| Answer first | 32 of 40 | 29 of 40 | 27 of 40 | 26 of 40 |
| Answer in the top 5 | 40 of 40 | 37 of 40 | 35 of 40 | 29 of 40 |
| Answer missing from the top 10 | 0 of 40 | 1 of 40 | 3 of 40 | 11 of 40 |
| Answer in a file that the product couldn't read | 0 of 40 | 0 of 40 | 0 of 40 | 9 of 40 |
Settings for each product
- Himring
- Himring read the files into one knowledge base on its default settings. The comparison script searched that knowledge base through Himring's HTTP API.
- LlamaIndex 0.14.25
- LlamaParse read the files at its Cost Effective tier, and LlamaIndex's default splitter cut them into chunks of 1,024 tokens with 200 tokens of overlap. OpenAI's text-embedding-3-small embedded the chunks. The vector search used LlamaIndex's default settings, and the hybrid search fused that vector search with BM25 by reciprocal rank. Neither search used a reranker.
- OpenAI file search
- OpenAI file search read the files into one vector store and searched it on its default settings.
How we scored each result
Each line of questions.jsonl lists a question, the file with its answer, and a quote from that file. We count a result as correct when it comes from that file and contains that quote.
The scorer compares only the words, in lowercase, after it removes markup and punctuation. It also accepts up to three other words between two words of the quote.
For one question, we also accept a second sentence from the same policy, because that policy states the answer in two places.
We record the position of the first correct result for each search, and we count a search as a miss when none of its 10 results is correct.
The 19 files
US government agencies publish all 19 files. Save each file under the folder and the file name that appear in this list, because questions.jsonl refers to each file by that path.
- directives/gsa-order-hrm-6010-1f-time-and-leave-administration.pdf, opens in a new tab
- directives/gsa-order-oas-5730-1-relocation-allowances.pdf, opens in a new tab
- directives/gsa-order-oas-5770-1b-local-travel-policy.pdf, opens in a new tab
- directives/gsa-order-oas-5775-1a-foreign-travel-policy.pdf, opens in a new tab
- scans/gsa-ftr-bulletin-18-09-scan.pdf, opens in a new tab
- scans/gsa-order-hrm-9510-1-position-management-classification-scan.pdf, opens in a new tab
- word/gsa-per-diem-highlights-fy2027.docx, opens in a new tab
- word/gsa-mie-breakdown-fy2025.docx, opens in a new tab
- word/section508-technology-accessibility-playbook-2018.docx, opens in a new tab
- word/section508-data-validation-fy24-governmentwide-assessment.docx, opens in a new tab
- slides/uswds-monthly-call-june-2024.pptx, opens in a new tab
- slides/uswds-monthly-call-may-2024.pptx, opens in a new tab
- per-diem/gsa-per-diem-rates.xlsx, opens in a new tab
- per-diem/gsa-per-diem-zip-codes-fy2027.xlsx, opens in a new tab
- web/tts-handbook-leave.html, opens in a new tab
- web/tts-handbook-travel-guide-faq.html, opens in a new tab
- web/uswds-design-tokens-spacing-units.html, opens in a new tab
- web/uswds-components-modal.html, opens in a new tab
- images/uswds-monthly-call-june-2024-title-card.png, opens in a new tab
Repeat the comparison yourself
Save these files in one folder, and put the 19 files in a folder called files beside them. The script for Himring and OpenAI file search needs a Himring API key and an OpenAI API key, and the LlamaIndex script needs a LlamaCloud API key and an OpenAI API key.
- questions.jsonl
This file lists the 40 questions, the file with the answer to each one, and the quote that the answer has to contain.
- search-comparison.mjs
This script sends every question to Himring and to OpenAI file search, and it saves the 10 results that each one returns.
- baseline.py
This script parses the files with LlamaParse, indexes them with LlamaIndex, and saves the results of the vector search and the hybrid search.
- pyproject.toml
This file lists the Python packages that baseline.py imports.
- uv.lock
This file lists the exact version of every Python package, so that uv installs the same ones.
- score-sides.mjs
This script scores every saved result and writes the tables of results.
- search-oracle.mjs
This script checks each result against the scoring rule on this page.
Upload the files folder to a Himring knowledge base, and set HIMRING_API_URL, HIMRING_API_KEY, OPENAI_API_KEY, and LLAMA_CLOUD_API_KEY as environment variables. Then enter these commands in order, with the IDs of your project and your knowledge base in place of PROJECT_ID and KNOWLEDGE_BASE_ID.
node search-comparison.mjs \
--questions questions.jsonl --files files --out out \
--project PROJECT_ID --knowledge-base KNOWLEDGE_BASE_ID
uv run baseline.py parse --files files --out out
uv run baseline.py search \
--files files --out out --questions questions.jsonl
node score-sides.mjs --questions questions.jsonl --out out \
--side Himring=out/sides/himring.json \
--side "LlamaIndex hybrid"=out/sides/llamaindex-hybrid.json \
--side "LlamaIndex vector"=out/sides/llamaindex-vector.json \
--side "OpenAI file search"=out/sides/openai.json