FindInFiles is a smart chatbot that helps you quickly retrieve, search, and summarize information from documents. Simply place your files in a folder (docs), ask your question, search for specific words, or request a summary, and the bot will process the content to provide precise responses. It's an efficient solution for professionals, students, and researchers to streamline document analysis and save time.
- Intelligent Chat: Engage in a conversational manner to ask questions and get accurate answers based on document content.
- Quick Search: Rapidly locate specific words or phrases within documents.
- Document Summarization: Generate concise summaries of document content.
- Advanced Language Model: Utilizes state-of-the-art natural language processing to understand and process queries.
-
Clone the repository:
git clone https://github.com/yourusername/FindInFiles.git cd FindInFiles
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up your environment variables:
- Copy
.env-example
to.env
- Fill in your API keys and other required information
- Copy
-
Start the Flask server:
python app.py
-
Send POST requests to
http://localhost:5000/process
with the following JSON structure:For chat mode:
{ "query": "Your question here", "mode": "chat" }
For search mode:
{ "query": "search word", "mode": "search" }
For summary mode:
{ "query": "Number of lines for summary", "mode": "summary" }
-
The server will respond with the answer, search results, or summary based on the documents in the
docs
folder.
- Place your documents in the
docs
folder. - Adjust the
max_history_size
inchains.py
to control the chat history length. - Modify the
chunk_size
andchunk_overlap
inretrievers.py
to fine-tune document processing.
To evaluate the performance of the chatbot, you can run the following command:
python evals.py
This will perform an experiment and evaluate the results based on the specified evaluators.
- The evaluators are in the
eval_utils/evaluators.py
file.You can add more evaluators to this file. - Dataset is in the
eval_utils/datasets.py
file. Modify the dataset to add more examples. - Experiment is in the
eval_utils/experiments.py
file.
- The evaluation results will be displayed in the langsmith console.
- Visit link that appears in the terminal to see the evaluation results.