{"id":25076239,"url":"https://github.com/v-ade-r/chatbot-based-on-contextual-rag-full-opensource","last_synced_at":"2026-04-29T21:32:46.981Z","repository":{"id":273445918,"uuid":"919739634","full_name":"v-ade-r/Chatbot-based-on-Contextual-RAG-full-OpenSource","owner":"v-ade-r","description":"Chatbot based on Contextual RAG with Hybrid Search and Reranking with short conversation history awareness, fully OpenSource.","archived":false,"fork":false,"pushed_at":"2025-01-27T01:04:14.000Z","size":682,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T22:43:14.407Z","etag":null,"topics":["chatbot","contextual-retrieval","fastapi","hybrid-search","llm","ollama","rag","reranking"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/v-ade-r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-20T23:20:26.000Z","updated_at":"2025-01-27T01:04:17.000Z","dependencies_parsed_at":"2025-01-27T00:33:49.367Z","dependency_job_id":null,"html_url":"https://github.com/v-ade-r/Chatbot-based-on-Contextual-RAG-full-OpenSource","commit_stats":null,"previous_names":["v-ade-r/contextual-rag-full-opensource","v-ade-r/contextual-rag-full-opensource-unfinished-","v-ade-r/chatbot-based-on-contextual-rag-full-opensource"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/v-ade-r/Chatbot-based-on-Contextual-RAG-full-OpenSource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-ade-r%2FChatbot-based-on-Contextual-RAG-full-OpenSource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-ade-r%2FChatbot-based-on-Contextual-RAG-full-OpenSource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-ade-r%2FChatbot-based-on-Contextual-RAG-full-OpenSource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-ade-r%2FChatbot-based-on-Contextual-RAG-full-OpenSource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v-ade-r","download_url":"https://codeload.github.com/v-ade-r/Chatbot-based-on-Contextual-RAG-full-OpenSource/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-ade-r%2FChatbot-based-on-Contextual-RAG-full-OpenSource/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32445111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","contextual-retrieval","fastapi","hybrid-search","llm","ollama","rag","reranking"],"created_at":"2025-02-07T01:35:00.182Z","updated_at":"2026-04-29T21:32:46.963Z","avatar_url":"https://github.com/v-ade-r.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chatbot based on Contextual RAG with Hybrid Search\nChatbot with Conversation History Awareness based on Contextual RAG with Hybrid Search and Reranking, fully OpenSource.\n\n## **Justification of this code**\nThe idea was to create a fully functional, completely open source Contextual RAG with Hybrid Search and Reranking application.\n\n## Some idea and code explanations \n**Todo\u003cbr\u003e**\nFront is tragic, but I don't really care, because it's not a front project.\n\n\n## **Usage tips**\n1. Download and install Ollama\n2. (Download the Llama3.1 model) In command line type: ollama run llama3.1\n3. In command line type: Ollama serve\n4. Download Docker and set it up.\n5. Open Docker Desktop\n6. In cmd type: docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e \"discovery.type=single-node\" -e \"xpack.security.enabled=false\" elasticsearch:8.8.0\n7. Good to go. Let's evaluate the retrieving capabilities running evaluate.py!\n8. Or run the app.py and use it. I would suggest you to trimm this codebase json to only a few chunks, create a database and upload your pdf to test the app. Remember to change the name of the database!!\n\n## **Retrieval evaluation** \nThe current code is capable of evaluating the approach using data structurized like the data prepared by Anthropic.\n\nI evaluated the retrieving accuracy at each stage. Pass@n - represents the accuracy of getting the 'golden chunk' (most relevant chunk for the query) within the top-n (top5 and top20) retrieved chunks.\n\nVectorDB (only semantic search):\u003cbr\u003e\nPass@5: 63.76%\u003cbr\u003e\nPass@20: 79.66%\u003cbr\u003e\n\nContextualVectorDB:\u003cbr\u003e\nPass@5: 69.84%\u003cbr\u003e\nPass@20: 83.13%\u003cbr\u003e\n\nContextualVectorDB + BM25 (adding BM25 creates Hybrid Search):\u003cbr\u003e\nPass@5: 76.53%\u003cbr\u003e\nPass@20: 87.37%\u003cbr\u003e\n\nContextualVectorDB + BM25 + Reranker:\u003cbr\u003e\nPass@5: 81.32%\u003cbr\u003e\nPass@20: 90.83%\u003cbr\u003e\n\n------------------\n(Context created by GPT-4o-mini)\u003cbr\u003e\nContextual + BM25 + reranker:\u003cbr\u003e\nPass@5: 81.99%\u003cbr\u003e\nPass@20: 93.75%\u003cbr\u003e\n\n## References\nhttps://github.com/anthropics/anthropic-cookbook/blob/main/skills/contextual-embeddings/guide.ipynb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-ade-r%2Fchatbot-based-on-contextual-rag-full-opensource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv-ade-r%2Fchatbot-based-on-contextual-rag-full-opensource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-ade-r%2Fchatbot-based-on-contextual-rag-full-opensource/lists"}