{"id":34963342,"url":"https://github.com/inbravo/rag-bot","last_synced_at":"2026-04-06T08:31:23.984Z","repository":{"id":317481271,"uuid":"1067586116","full_name":"inbravo/rag-bot","owner":"inbravo","description":"A Python based RAG bot using LangChain Framework","archived":false,"fork":false,"pushed_at":"2026-01-22T05:29:04.000Z","size":4882,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-22T19:46:38.907Z","etag":null,"topics":["flask","langchain","rag","rag-chatbot"],"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/inbravo.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-01T04:38:06.000Z","updated_at":"2025-12-24T08:26:45.000Z","dependencies_parsed_at":"2025-10-01T07:12:45.838Z","dependency_job_id":"015bbe64-5198-48df-85ff-b46f8c5e3410","html_url":"https://github.com/inbravo/rag-bot","commit_stats":null,"previous_names":["inbravo/rag-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/inbravo/rag-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbravo%2Frag-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbravo%2Frag-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbravo%2Frag-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbravo%2Frag-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inbravo","download_url":"https://codeload.github.com/inbravo/rag-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbravo%2Frag-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["flask","langchain","rag","rag-chatbot"],"created_at":"2025-12-26T22:50:59.657Z","updated_at":"2026-04-06T08:31:23.976Z","avatar_url":"https://github.com/inbravo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Python based local Retrieval-Augmented Generation (RAG) chatbot that can answer to queries questions based on the context information available\n\n## Solution components\n| #  |  Code/File | Purpose   | Design Principle   | Tech Stack  |\n|---|---|---|---|---|\n| 1 | [FlaskApp][Link_1.md] |  Server side to manage user request from web browser | [WSGI][Link_2.md] |  [Flask][Link_3.md] |\n| 2 | [AppConfig][Link_4.md] and [Enviornment file][Link_19.md]| Application module to load configuration from environment variables, initializes the retriever and LLM model and provides methods to update the configuration dynamically. | [12 Factor Config][Link_5.md] | [DotEnv][Link_6.md] |\n| 3 | [RagRetriever][Link_7.md] | RAGRetriever class to handle retrieval-augmented generation. It interacts with a vector database to fetch relevant documents based on query similarity. It uses an embedding model to compute text embeddings for similarity comparison. It extracts relevant context and source information from the retrieved documents. | [2 Step RAG][Link_8.md]  | [Langchain Chroma Vectorstore][Link_9.md]  |\n| 4 | [EmbeddingFactory][Link_10.md] | Embedding Factory class to select and return the appropriate embedding function based on the specified model name (Ollama, OpenAI etc) | [Vectorization \u0026 Similarity Scoring][Link_11.md] |  [Langchain Embeddings][Link_12.md]|\n| 5 | [DocUploader][Link_13.md]| Manage the database population with embeddings | [Vector Database][Link_14.md] | [Langchain Chroma][Link_15.md] | \n| 6 | [LLMFactory][Link_16.md] | Factory class to create LLM instances based on model type e.g., 'ollama', 'gpt', 'claude') | [Factory Pattern][Link_17.md] | [Langchain Models][Link_18.md] |\n\n## Applicable usecases\n### Option I - Knoledge management - supports the scanning of the documents (pdf, doc, excel etc.).\n\n\u003cdiv style=\"text-align: center;\"\u003e\n\u003cimg src=\"https://github.com/inbravo/rag-bot/blob/main/images/kms.png\" alt=\"call-flow\"\u003e\n\u003c/div\u003e\n\n### Option II - Salesforce data (Opportunity, Account, Lead, Contact etc.) intelligence\n\n\u003cdiv style=\"text-align: center;\"\u003e\n\u003cimg src=\"https://github.com/inbravo/rag-bot/blob/main/images/sfdc.png\" alt=\"call-flow\"\u003e\n\u003c/div\u003e\n\n## LLM configuration\n\n|# | Option | Description|\n|---|---|---|\n| 1 | Local Setup with Ollama | **Download and install Ollama on your PC**: Visit [Ollama's official website](https://ollama.com/download) to download and install Ollama. Ensure you have sufficient hardware resources to run the local language model. Pull a LMM of your choice: ```sh ollama pull \u003cmodel_name\u003e  # e.g. ollama pull llama3:8b ``` |\n| 2 | Use OpenAI API for GPT Models | **Set up OpenAI API**: you can sign up and get your API key from [OpenAI's website](https://openai.com/api/). |\n| 3 | Use Anthropic API for Claude Models | **Set up Anthropic API**: you can sign up and get your API key from [Anthropic's website](https://www.anthropic.com/api). | \n\n## Code repo setup and build\n1. **Clone the repository and navigate to the project directory**:\n    ```sh\n    git clone https://github.com/inbravo/rag-bot.git\n    cd rag-bot\n    ```\n2. **Create a virtual environment**:\n    ```sh\n    python -m venv venv\n    source venv/bin/activate  # On Windows, use `venv\\Scripts\\activate`\n    ```\n3. **Install the required libraries**:\n    ```sh\n    pip install -r requirements.txt\n    ```\n4. **Insert you own Word/XLSX/PDF in /data folder**. You can change this path in [ENV][Link_19.md] file by changing the property 'DATA_PATH'\n5. **Run once the populate_database script to index the pdf files into the vector db:**\n    ```sh\n    python DocUploader.py\n    ```\n6. **Run the application:**\n    ```sh\n    python FlaskApp.py\n    ```\n7. Navigate to **`http://localhost:5000/`** and If needed, click on ⚙️ icon to access the admin panel and adjust app parameters\n9. Perform a query and Chatbot will reply the best answer\n\n[Link_1.md]: https://github.com/inbravo/rag-bot/blob/main/FlaskApp.py\n[Link_2.md]: https://flask.palletsprojects.com/en/stable/design\n[Link_3.md]: https://flask.palletsprojects.com/en/stable/design](https://flask.palletsprojects.com/en/stable\n[Link_4.md]: https://github.com/inbravo/rag-bot/blob/main/AppConfig.py\n[Link_5.md]: https://12factor.net/config\n[Link_6.md]: https://github.com/motdotla/dotenv\n[Link_7.md]: https://github.com/inbravo/rag-bot/blob/main/retrieval/RAGRetriever.py\n[Link_8.md]: https://docs.langchain.com/oss/python/langchain/retrieval\n[Link_9.md]: https://api.python.langchain.com/en/latest/vectorstores/langchain_chroma.vectorstores.Chroma.html\n[Link_10.md]: https://github.com/inbravo/rag-bot/blob/main/embeddings/EmbeddingFactory.py\n[Link_11.md]: https://docs.langchain.com/oss/python/integrations/text_embedding\n[Link_12.md]: https://api.python.langchain.com/en/latest/community/embeddings.html\n[Link_13.md]: https://github.com/inbravo/rag-bot/blob/main/DocUploader.py\n[Link_14.md]: https://docs.trychroma.com/docs/overview/getting-started\n[Link_15.md]: https://docs.langchain.com/oss/python/integrations/vectorstores/chroma\n[Link_16.md]: https://github.com/inbravo/rag-bot/blob/main/llm/llm_factory.py\n[Link_17.md]: https://en.wikipedia.org/wiki/Factory_method_pattern\n[Link_18.md]: https://docs.langchain.com/oss/python/langchain/models\n[Link_19.md]: https://github.com/inbravo/rag-bot/blob/main/.env\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finbravo%2Frag-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finbravo%2Frag-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finbravo%2Frag-bot/lists"}