{"id":25803206,"url":"https://github.com/brenimcode/ai-agent-faq","last_synced_at":"2026-06-09T18:31:32.387Z","repository":{"id":274523013,"uuid":"923191201","full_name":"brenimcode/ai-agent-faq","owner":"brenimcode","description":"Personal project creating an AI Agent to answer FAQs using the DeepSeek LLM and RAG technique, enhancing response accuracy for industries with frequent customer inquiries.","archived":false,"fork":false,"pushed_at":"2025-01-27T19:52:45.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T23:36:03.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/brenimcode.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-27T19:44:18.000Z","updated_at":"2025-02-03T13:21:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"8fb19d26-dc03-431e-97cb-db895b659928","html_url":"https://github.com/brenimcode/ai-agent-faq","commit_stats":null,"previous_names":["brenimcode/ai-agent-faq"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brenimcode/ai-agent-faq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenimcode%2Fai-agent-faq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenimcode%2Fai-agent-faq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenimcode%2Fai-agent-faq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenimcode%2Fai-agent-faq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brenimcode","download_url":"https://codeload.github.com/brenimcode/ai-agent-faq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenimcode%2Fai-agent-faq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34121021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":[],"created_at":"2025-02-27T17:44:29.411Z","updated_at":"2026-06-09T18:31:32.375Z","avatar_url":"https://github.com/brenimcode.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Agent FAQ with Retrieval-Augmented Generation (RAG)\n\nThis personal project involves the development of an **AI Agent** designed to intelligently and personally respond to Frequently Asked Questions (FAQ) using a **Large Language Model (LLM)**. The chosen model, **DeepSeek** , is integrated with the **Retrieval-Augmented Generation (RAG)** technique to enhance response accuracy and relevance. This solution is applicable across a variety of industries that encounter frequent customer inquiries, enabling efficient, context-aware automation.\n\n---\n\n## **Features**\n- **Intelligent FAQ Handling**: Understands the context and retrieves the most relevant answers from the FAQ database.\n- **Built on RAG**: Combines retrieval capabilities with advanced generative AI models to enhance accuracy and contextual understanding.\n- **Open Source Tools**: Uses `LangChain`, `SentenceTransformers`, and `Chroma` for flexibility and integration.\n- **Customizable and Extendable**: Add your FAQ content and easily modify the system for your specific use case.\n\n---\n\n## **Requirements**\n\n### **Libraries and Tools**\n- Python 3.9+\n- LangChain\n- SentenceTransformers\n- ChromaDB\n- LangChain-GROQ (optional for LLM integration)\n- DeepSeek\n\n### **Installation**\nBefore running the notebook, ensure you install the necessary dependencies:\n\n```bash\npip install langchain sentence-transformers chromadb langchain-groq\n```\n\n---\n\n## **Setup Instructions**\n\n### **1. Clone the Repository**\n```bash\ngit clone https://github.com/your-repo/ai-agent-faq.git\ncd ai-agent-faq\n```\n\n### **2. Add Your FAQ Content**\nModify the `texto` variable inside the notebook to include your FAQ content. Ensure the structure matches your use case, as shown in the sample code.\n\n### **3. Install Dependencies**\nRun the following command inside your notebook to install the required packages:\n```python\n!pip install -qU langchain sentence-transformers chromadb langchain-groq\n```\n\n### **4. Prepare the Knowledge Base**\nThe knowledge base is created using the **LangChain** framework and **ChromaDB**. It involves:\n1. Converting the FAQ text into `Document` objects.\n2. Splitting the content into manageable chunks using `RecursiveCharacterTextSplitter`.\n3. Generating embeddings with **SentenceTransformers**.\n\n```python\nfrom langchain.schema import Document\nfrom langchain.text_splitter import RecursiveCharacterTextSplitter\nfrom langchain_community.vectorstores.chroma import Chroma\nfrom langchain_community.embeddings import HuggingFaceEmbeddings\n\n# Add your FAQ content\ntexto = \"...\"\n\n# Prepare documents\ndocuments = [Document(page_content=texto, metadata={\"source\": \"https://example.com\"})]\ntext_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=500)\nchunks = text_splitter.split_documents(documents)\n\n# Generate embeddings\nembeddings = HuggingFaceEmbeddings(model_name=\"sentence-transformers/all-MiniLM-L6-v2\")\ndb = Chroma.from_documents(documents=chunks, embedding=embeddings, persist_directory=\"db\")\n```\n\n### **5. Configure API Keys**\nIf you use an external LLM (e.g., GROQ API), ensure the API key is set in your environment:\n```python\nimport os\nos.environ['GROQ_API_KEY'] = 'your-groq-api-key'\n```\n\n### **6. Run the RAG Function**\nYou can query the AI Agent by calling the `rag()` function:\n```python\nresponse = rag(\"What products does your store sell?\")\nprint(response)\n```\n\n---\n\n## **File Breakdown**\n- **`notebook.ipynb`**: Main code file that builds and runs the AI Agent.\n- **`db/`**: Directory where the ChromaDB database is stored.\n- **`requirements.txt`**: List of required Python dependencies.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrenimcode%2Fai-agent-faq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrenimcode%2Fai-agent-faq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrenimcode%2Fai-agent-faq/lists"}