
OpenAI Knowledge Retrieval Starter
https://github.com/openai/openai-knowledge-retrieval- Category
- AI Tools
- Rank
- No. 1868Tools index
Previous survey · No. 1858 ·
- Pricing
- Open Source
- Type
- TOOL
- Builder
- openai
- GitHub
- 95 stars
- Date
About
Open-source starter kit from OpenAI for building knowledge retrieval (RAG) systems on top of the OpenAI API.
What it does
You describe a document corpus in YAML, then ingest, chunk, embed, search, rerank, and synthesize cited answers through one pipeline. It can delegate storage and retrieval to OpenAI File Search or run against Qdrant. A command-line interface, chat backend, React frontend, and evaluation harness cover the working loop.
Why it's ranked here
This is a strong reference implementation because it connects configuration, ingestion, retrieval, cited synthesis, and evaluation instead of stopping at a search demo. The included Qdrant path and plugin protocol provide an escape hatch from managed storage. Some rough edges, particularly inconsistent backend ports and partially implemented store choices, keep it from feeling turnkey.
What's good
YAML controls chunking, retrieval, synthesis, prompts, models, filters, and evaluation without routine code edits. Chunking includes recursive, heading-aware, hybrid, XML-aware, and custom strategies. Retrieval can add query expansion, hypothetical-document embeddings, similarity filtering, and reranking. Evaluations accept curated data or generate questions from the corpus, then produce local reports and optionally mirror results to OpenAI Evals.
Tradeoffs
The backend still requires an OpenAI key for embeddings and answer generation, including the Qdrant route. The optional web interface adds a separate Node.js toolchain and process. Configuration recognizes several custom store kinds, but the bundled factory implements only Qdrant and dynamically loaded plugins. Skipping ingestion preflight can create duplicate uploads.
How to use it well
Use it when an engineering team wants a configurable baseline for testing retrieval choices against a local document corpus. Start with managed File Search, establish cited answers and evaluation data, then switch to Qdrant or a plugin when storage control matters. It does not provide managed document connectors, deployment automation, or a complete production operations layer.
Technical notes+
pyproject.toml packages openai-answer-engine with setuptools, requires Python 3.10+, and exposes the rag script at cli.main:app. cli/main.py provides init, config linting, ingestion, chat, evaluation, and clearing commands. Pydantic models in cli/config.py validate the YAML surface. stores/base.py defines the VectorStore protocol and factory, whose implemented branches are OpenAI File Search, Qdrant, and dynamically imported plugins. models/synthesis.py uses the Responses API with store=False, then derives citation spans from retrieved chunks. evals/harness.py writes Markdown and HTML reports and can invoke hosted OpenAI Evals. One integration mismatch is visible: README.md says the frontend talks to port 8000, while Makefile launches the app backend on port 8002.
Observed
- License
- MIT
- Primary language
- Python 3, requiring Python 3.10 or later
- Packaging
- Setuptools project installable with pip in editable mode; development extras include pytest, Ruff, and coverage support
- Interfaces
- Typer command-line interface, FastAPI backend API, and Vite plus React web interface
- Storage backends
- OpenAI File Search and Qdrant are bundled; custom stores can be loaded as Python plugins
- Platform support
- Package metadata declares operating-system independence
- Optional UI requirement
- Node.js 18.18 or later is required for the web interface
- Evaluation surface
- Supports curated or synthesized JSONL datasets, local grading, Markdown and HTML reports, and optional OpenAI Evals mirroring
Read from README.md, Makefile, pyproject.toml, cli/main.py, cli/config.py, stores/base.py, cli/env_utils.py, evals/harness.py, evals/rubrics.py, prompts/loader.py, ingestion/types.py, models/synthesis.py, retrieval/filter.py, telemetry/logging.py, ingestion/pipeline.py.
What it can do
Build knowledge retrieval systems
Documents and text data → RAG-enabled application
Index document content
Text documents or files → Searchable vector embeddings
Retrieve relevant information
User query → Contextually relevant document snippets
Generate AI responses with context
User question and retrieved documents → Contextually-aware AI answer
Process and chunk documents
Large text documents → Segmented text chunks for embedding
Integrate with OpenAI API
API credentials and configuration → Connected knowledge retrieval system
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.