Get your RAG chatbot running in 5 minutes!
- Python 3.8 or higher
- OpenAI API key (Get one here)
pip install -r requirements.txtCreate a .env file in the project root:
echo "OPENAI_API_KEY=sk-your-actual-api-key-here" > .envReplace sk-your-actual-api-key-here with your real OpenAI API key!
The project comes with sample documents in the docs/ folder. Ingest them:
python ingest.pyExpected output:
INFO - Starting document ingestion pipeline...
INFO - Processing file: sample_product_guide.md
INFO - Created 25 chunks from sample_product_guide.md
INFO - Processing file: company_policies.txt
INFO - Created 45 chunks from company_policies.txt
INFO - Processing file: technical_documentation.md
INFO - Created 52 chunks from technical_documentation.md
INFO - Total chunks created: 122
INFO - Creating embeddings...
INFO - Successfully ingested 122 chunks into ChromaDB
INFO - Ingestion pipeline completed successfully!
uvicorn app:app --reloadOpen your browser and go to:
http://localhost:8000
You'll see a beautiful chat interface! Try asking questions like:
- "What is the SmartHome Hub?"
- "What is the remote work policy?"
- "How do I upload a file using the CloudSync API?"
- "What are the parental leave benefits?"
- "How do I create automation rules?"
Run the test script:
python test_rag.pyThis will ask several questions and show you the answers with source context.
- Add PDF, TXT, or MD files to the
docs/folder - Run the ingestion again:
python ingest.py - Start asking questions about your documents!
- Make sure you created the
.envfile - Check that your API key starts with
sk- - Don't use quotes around the value in
.env
- Make sure you installed dependencies:
pip install -r requirements.txt - Consider using a virtual environment
- Check that files are in the
docs/folder - Verify file extensions are
.pdf,.txt, or.md
- Read the full README.md for detailed documentation
- Customize chunking parameters in
ingest.py - Adjust retrieval settings in
rag.py - Explore the API at http://localhost:8000/docs
For SmartHome Hub guide:
- "How do I set up the SmartHome Hub?"
- "What are the technical specifications?"
- "How do I create a Good Morning routine?"
For Company Policies:
- "How many PTO days do I get?"
- "What is the professional development budget?"
- "What are the remote work requirements?"
For CloudSync API:
- "How do I authenticate with the API?"
- "Show me how to upload a file"
- "What are the rate limits?"
Need help? Check the full README.md or review the code comments in each file.