context  by fleet-ai

CLI tool & API for Python library Q/A and code generation

created 1 year ago
548 stars

Top 59.1% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Fleet Context is a CLI tool and API designed to provide question-answering and code generation capabilities over the documentation of over 1200 Python libraries. It targets developers seeking up-to-date information and code examples for Python packages, offering significant improvements in AI model generation scores by leveraging rich, structured metadata.

How It Works

The tool utilizes a vector database populated with embeddings generated from Python library documentation. It employs a retrieval-augmented generation (RAG) approach, fetching relevant documentation chunks based on user queries. The system's advantage lies in its comprehensive metadata, including library_id, page_id, section_index, type (e.g., class, function), and original Markdown-formatted text, which allows for sophisticated filtering, re-ranking, and prompt construction to enhance AI response quality.

Quick Start & Requirements

  • Install: pip install fleet-context
  • Prerequisites: OpenAI API key (or OpenRouter API key for other models). Local model support requires LM Studio.
  • Usage: Run context for CLI, or from context import download_embeddings, query for API.
  • Links: Website, Data Visualizer, PyPI

Highlighted Details

  • Supports over 1200 Python libraries.
  • Achieved 37-point and 34-point generation score improvements for GPT-4 and GPT-4 Turbo, respectively.
  • Rich metadata enables advanced retrieval strategies like re-ranking by section_index and filtering by type.
  • Supports OpenAI, OpenRouter (Claude, CodeLlama, Mistral), and local models via LM Studio.

Maintenance & Community

  • Project maintained by fleet-ai.
  • Links to community resources are not explicitly provided in the README.

Licensing & Compatibility

  • License is not specified in the README.
  • Compatibility for commercial use or closed-source linking is not detailed.

Limitations & Caveats

The README does not specify the license, making commercial use and closed-source integration uncertain. Metadata type is not guaranteed for all libraries, particularly those not using Sphinx/readthedocs for documentation generation.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems) and Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind).

LightRAG by HKUDS

1.0%
19k
RAG framework for fast, simple retrieval-augmented generation
created 10 months ago
updated 23 hours ago
Feedback? Help us improve.