context  by fleet-ai

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

Created 1 year ago
548 stars

Top 58.3% 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

Inactive

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

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Simon Willison Simon Willison(Coauthor of Django).

semantra by freedmand

0.1%
3k
CLI tool for semantic document search
Created 2 years ago
Updated 1 year ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Anton Troynikov Anton Troynikov(Cofounder of Chroma), and
44 more.

llama_index by run-llama

0.3%
44k
Data framework for building LLM-powered agents
Created 2 years ago
Updated 19 hours ago
Feedback? Help us improve.