Skip to content

ContextualAI/examples

Repository files navigation

🌟 Contextual API Examples

Welcome to our collection of example notebooks showcasing the power of Contextual's AI platform! 🚀

🎯 Overview

This repository contains practical examples and demonstrations of how to interact with Contextual's API, helping you get started quickly and efficiently. You can run these examples in any jupyter notebook but an easy way to get started is Colab notebooks:

Open In Colab

📚 Table of Contents

  • 🚀 End to End Example - End to End example of the Contextual Platform
  • 🔬 Hands on Lab - Lab broken into three chapters, Creating Agent & Datastores, Evaluation, and Tuning
  • 🔧 Standalone API - Examples of using individual API endpoints like /generate and /rerank, /parse and /lmunit.
  • 📊 Sheets Script - A Google Sheets script that automates form filling using Contextual AI's API integration.
  • 📝 Policy Changes - An example use case for tracking changes in long policy documents.
  • 📈 Improving Agent - An example use case for improving or specializing your RAG agent.
  • ⚖️ Using RAGAS for Evaluation - A walkthrough for using RAGAS on a RAG agent.
  • 🎯 LMUnit Evaluation for RewardBench - Showing LMUnit for evaluating RewardBench.

🚀 Getting Started

  1. 📥 Clone this repository
    git clone https://github.com/ContextualAI/examples
  2. 🔑 Set up your API credentials in the respective notebook
    API_TOKEN = '...'  # Replace with your actual API token
  3. 📦 Install required dependencies
    pip install -r requirements.txt
  4. 🎮 Run the example notebook

🔧 Prerequisites

  • Python 3.7+
  • Jupyter Notebook/Lab
  • Contextual API credentials
  • Required Python packages (listed in requirements.txt)

💡 Related Examples

🤝 Contributing

We welcome contributions! Feel free to:

  • 🐛 Report bugs
  • ✨ Request features
  • 🔀 Submit pull requests

📫 Support

Need help?

⚖️ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by the Contextual team

About

Sample files, code snippets and downloads for ContextualAI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10