Documentation

This commit is contained in:
Yiorgis Gozadinos 2025-07-02 11:17:16 +03:00
parent 85443ee963
commit fb837ede69
No known key found for this signature in database
3 changed files with 20 additions and 0 deletions

View file

@ -31,6 +31,9 @@ haiku-rag search "query"
# Ask questions
haiku-rag ask "Who is the author of haiku.rag?"
# Rebuild database (re-chunk and re-embed all documents)
haiku-rag rebuild
# Start server with file monitoring
export MONITOR_DIRECTORIES="/path/to/docs"
haiku-rag serve

View file

@ -35,6 +35,16 @@ haiku-rag get 1
haiku-rag delete 1
```
### Rebuild Database
Rebuild the database by deleting all chunks & embeddings and re-indexing all documents:
```bash
haiku-rag rebuild
```
Use this when you want to change things like the embedding model or chunk size for example.
## Search
Basic search:

View file

@ -67,6 +67,13 @@ await client.update_document(doc)
await client.delete_document(doc.id)
```
### Rebuilding the Database
```python
async for doc_id in client.rebuild_database():
print(f"Processed document {doc_id}")
```
## Searching Documents
Basic search: