Skip to content

Sample files, code snippets and downloads for ContextualAI

License

Notifications You must be signed in to change notification settings

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.
  • ๐Ÿ“Š 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.

๐Ÿš€ 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)

๐Ÿ’ก Examples Include

  • ๐Ÿ”„ Basic API calls to create an Application
  • ๐Ÿ“Š Tune your Application
  • ๐Ÿ“ˆ Evaluation and Hillclimbing

๐Ÿค 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