Logo Lanfrica

segni49/OkooAI-Tourism_Assistant-

Domain:

natural language processing

Record type:

software
Creator:
seg
Host:
OkooAI is a Retrieval-Augmented Generation (RAG) system built with LangChain, FastAPI, and ChromaDB. It answers tourism-related questions about Ethiopia using real documents, strict fallback logic, and adaptive routing. # 🧠 OkooAI β€” Tourism Assistant Powered by RAG OkooAI is a Retrieval-Augmented Generation (RAG) system built with LangChain, FastAPI, and ChromaDB. It answers tourism-related questions about Ethiopia using real documents, strict fallback logic, and adaptive routing. ## πŸš€ Features - βœ… Naive + Adaptive RAG pipeline - βœ… LangGraph-based intent routing - βœ… Strict fallback: no hallucinations - βœ… Modular nodes for planning, comparison, exploration - βœ… PDF ingestion and chunking - βœ… Ollama-powered local LLM (Qwen 0.5b) - βœ… FastAPI backend with clean endpoints ## 🧱 Architecture ```bash User Query β”‚ β–Ό Intent Classifier ──► LangGraph Router β”‚ β”‚ β–Ό β–Ό Retriever β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ Nodes: β”‚ β–Ό β”‚ - ask_fact β”‚ LLM + Prompt β”‚ - plan_trip β”‚ β”‚ β”‚ - compare β”‚ β–Ό β”‚ - explore β”‚ Reflection Node β—„β”€β”€β”€β”˜ β”‚ β–Ό Final Answer + Source Chunks ```bash ## πŸ“‚ Project Structure ```bash advanced_rag_ai/ β”œβ”€β”€ api/ β”‚ β”œβ”€β”€ main.py # FastAPI entry point β”‚ β”œβ”€β”€ tourism_graph.py # LangGraph workflow β”‚ β”œβ”€β”€ planner_node.py # Trip planner logic β”‚ β”œβ”€β”€ hotel_comparison_node.py β”‚ β”œβ”€β”€ explore_place_node.py β”‚ β”œβ”€β”€ intent_classifier.py β”‚ β”œβ”€β”€ adaptive_retriever.py β”‚ └── self_reflective_rag.py β”œβ”€β”€ data/ # Indexed tourism PDFs β”œβ”€β”€ requirements.txt β”œβ”€β”€ Dockerfile └── README.md ``` ## πŸ§ͺ Demo Instructions ### 1. Start Ollama ```bash ollama run qwen:0.5b ``` ### 2. Run the API ```bash uvicorn api.main:app --reload ``` ### 3. Test the Chat Endpoint ```bash curl -X POST localhost \ -H "Content-Type: application/json" \ -d '{"session_id": "demo", "question": "Plan a trip to Gondar", "model": "qwen:0.5b"}' ``` ### 4. Upload a PDF ``` bash curl -X POST localhost \ -F "file=@data/03_Gondar_Bahir_Dar_Lake_Tana_Blue_Nile.pdf" ``` ## πŸ“¦ Deployment Use Docker for production: ```bash docker build -t oko …