A RAG-based HR chatbot with MCP server for document retrieval and email functionality
Project description
Rag chatbot with a localhost MCP server
Building a RAG-based HR chatbot for providing rules in the workplace with the localhost MCP server as a function-calling hub
Overview
This project implements a Retrieval-Augmented Generation (RAG) chatbot using Streamlit and the MCP server. Users can upload PDF files, and the chatbot retrieves relevant information from the PDFs to answer natural language questions. The system leverages OpenAI models, LangChain utilities, and an in-memory vector store for efficient document retrieval.
Features
-
MCP Tool Integration:
Tool orchestration with MCP ensures smooth communication between document indexing, retrieval, and answer generation. The backend tools can be extended or replaced easily as new functionalities are added. -
PDF Upload and Parsing:
Upload a PDF file which is then parsed usingPDFPlumberLoaderto extract text content. -
Text Chunking:
The extracted text is split into smaller chunks usingRecursiveCharacterTextSplitterto facilitate efficient indexing and retrieval. -
Document Indexing:
Chunks are indexed in an in-memory vector store with embeddings generated viaOpenAIEmbeddings. -
Similarity Search (Consine Similarity):
When a user submits a query, the chatbot performs a similarity search to retrieve the most relevant document chunks based on the query. -
Prompt-Based Answer Generation:
A custom prompt template combines the user question with retrieved context, and a GPT-4 powered LLM (usingChatOpenAI) generates the final answer. -
Interactive Interface:
The application uses Streamlit to provide an interactive, chat-like interface where user questions and bot responses are displayed.
Result
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_imvirtue_ragchatbot_mcpserver-0.1.0.tar.gz.
File metadata
- Download URL: iflow_mcp_imvirtue_ragchatbot_mcpserver-0.1.0.tar.gz
- Upload date:
- Size: 459.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c76351669efdca219c74a836f49e98a7b6976fc312917fb51c2e4c4bdcf29e8
|
|
| MD5 |
14e38c599a1fe5751f1cd45c25355668
|
|
| BLAKE2b-256 |
b670e8219e2c8d353eb4c8793c30909db502836ce138c3f5e2f3ceaca349e43a
|
File details
Details for the file iflow_mcp_imvirtue_ragchatbot_mcpserver-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_imvirtue_ragchatbot_mcpserver-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec688ddf3164dc6e0fbe56c4378b97d1fd8f4b91309cbdcef1bab9379aa65647
|
|
| MD5 |
b24095e384466dda63e0b7126f3d3275
|
|
| BLAKE2b-256 |
bdfa9977d93f02736532dcbe0f3e98c731c91a3dad85707483f81a6512b1a0e3
|