CoVe is a Python project that leverages OpenAI's GPT-3.5 and other language models to create a chain of verification for answering questions, fact-checking statements, and generating verified responses. This project is designed to assist in providing well-researched and factually accurate answers to questions.
CoVe allows you to follow a structured process to answer questions and verify information. The process consists of several steps, including drafting an initial response, planning verification questions, answering those questions, and generating a final verified response.
Before using CoVe, ensure you have the following prerequisites installed:
- Python 3.8.2 < 3.9 or later
- Pip for package management
To install CoVe and its dependencies, follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/vanamayaswanth/Chain-of-Verification.git cd CoVe
-
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate
-
Install the required Python packages:
pip install -r req.txt
To use CoVe, follow these steps:
-
Input your OpenAI API key when prompted.
-
Run the CoVe application:
python CoVe.py
-
Enter your question or statement when prompted.
-
CoVe will guide you through the verification process and provide a final verified response.
CoVe supports custom memory implementations for storing and retrieving information during verification. You can customize the memory functionality by implementing a custom memory class, as shown in the provided example.
Contributions are welcome! If you have ideas for improvements or encounter issues, please open an issue or submit a pull request.
purely reflecting the langchain custom verification docs fix bug and improvement