# Ask questions of a classic book

A chat assistant that answers questions about a public-domain novel and quotes the passage it used.

## Parts

- Data: [Project Gutenberg](https://agentgid.com/resources/project-gutenberg/agent.md): A volunteer-built library of free eBooks, mostly older works out of US copyright, offered as HTML, EPUB, Kindle and plain text, with full catalog dumps in RDF and CSV.
- Product recipe: [RAG assistant](https://agentgid.com/build/recipes/rag-assistant/agent.md)
- Vector store: [LanceDB](https://agentgid.com/tools/lancedb/agent.md)
- Embeddings: [Sentence Transformers](https://agentgid.com/tools/sentence-transformers/agent.md)

## Steps

1. Get the book's plain text through the catalog files or a mirror, not by crawling the website.
2. Split it into passages, embed them and store them with chapter numbers.
3. Answer questions with the RAG recipe and show the quoted passage with its chapter.

## Watch out

- The texts are public domain in the US, but using the Project Gutenberg name commercially falls under its license; outside the US check local copyright.

Human page: https://agentgid.com/resources/ideas/ask-a-classic-book/
