This repository includes sample data and a quick-start guide: Quick-start.ipynb to help you get started quickly!
The example can be completed in under 15 minutes. The notebook is self-contained and includes detailed explanations for each step.
For comprehensive platform documentation, visit docs.contextual.ai
- Contextual AI Platform access
- Python 3.8+
- Python client
pip install --pre contextual-client
To use the notebooks, you will need an API key to securely access the API. To generate an API key, your admin can follow the process below:
- Log into your tenant at app.contextual.ai
- Click on "API Keys"
- Click on "Create API Key"
- Please keep your key in a secure place, and do not share it with anyone
These examples focus on creating a financial RAG agent that:
- Answers questions based on provided documents
- Avoids making forward-looking statements
- Handles financial data responsibly
- Provides accurate, document-based responses
Some sample data files are used in these notebooks, an ingested document, and some additional documents included in zipped folders if you want to test ingesting multiple documents.
- Ingestion:
Apple.pdf(with additional pdf's included in the zip files)
To quickly get started running the notebook we reccomend using Google Colab. If you'd prefer to run it locally, you can run in VS Code following these steps:
-
📥 Clone this repository
git clone https://github.com/ContextualAI/examples cd examples/ -
🌎 Create a virtual environment:
python -m venv . && source bin/activate
-
📦 Install required dependencies
pip install -r requirements.txt
-
🎮 Open the notebook in VS Code, click on "Select Kernel" (top right) -> "Python Environments" and select the newly created
venvenvironment: -
🔑 Set up your API credentials in the respective notebook
API_TOKEN = '...' # Replace with your actual API token
