QAGPT is a question-answering application that uses a combination of document indexing and a large language model (LLM) like GPT to provide accurate and relevant answers to user questions. The system indexes a collection of documents in a vector database and leverages GPT to extract precise answers from the most relevant documents.
- Indexing of documents in a vector database
- Query engine to find the most relevant documents
- Integration with GPT for answer extraction
- User-friendly interface for inputting questions and viewing answers
- Clone the repository:
git clone https://github.com/yourusername/QAGPT.git
- Navigate to the project directory:
cd QAGPT
- Install the required dependencies:
pip install -r requirements.txt
- Index your documents:
python index_documents.py --input_dir /path/to/your/documents --file_type markdown --collection_name my_collection
- Run the application:
python app.py
-
Open a web browser and navigate to http://localhost:5000 to access the user interface.
-
Enter your question in the search bar and hit Enter or click the "Ask" button.
-
The answer will be displayed along with the most relevant document(s).
- To change the LLM, edit the config.py file and update the LLM_MODEL variable.
- To adjust the number of top documents returned by the query engine, update the NUM_TOP_DOCS variable in the config.py file
We welcome contributions! Please read our CONTRIBUTING.md file to learn how you can contribute to the project.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- OpenAI for providing the GPT models
- Vector database libraries (e.g., Faiss, Annoy, Elasticsearch) for document indexing
- Pre-trained word embeddings (e.g., Word2Vec, GloVe, FastText)
Note: Be sure to customize the repository URL, username, and other details in the README to match your project.