Get started¶
Prerequisites¶
- Python 3.12 or later
- uv
- An Anthropic API key
- A Voyage AI API key only for vector or hybrid retrieval
Install¶
Clone the repository and install its locked dependencies:
Copy the environment template and add your Anthropic key:
Never commit .env. The repository tracks only the secret-free .env.example template.
Run the CLI¶
Enter a question at the prompt. Type exit or press Ctrl+C to stop. Conversation history is saved after every completed turn and restored on the next run.
Enable local retrieval¶
BM25 mode runs locally and needs no additional API key:
Run the CLI again:
The answer is followed by the local chunk IDs used as sources. Retrieved source text is sent only with the current request and is not written into conversation history.
Enable hybrid retrieval¶
Add a Voyage AI key and build the local vector indexes:
Generated indexes and the embedding cache are stored in .rag-index/, which is excluded from Git.
Verify the project¶
The complete test suite uses mocked Anthropic and Voyage clients, so it makes no paid API calls:
For the deterministic BM25 retrieval benchmark: