Skip to content

docs: Add comprehensive LLM-friendly documentation #1779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

askdevai-bot
Copy link

@askdevai-bot askdevai-bot commented Jul 14, 2025

📚 Add Comprehensive LLM-Friendly Documentation

Overview

This PR adds a comprehensive LLM.md file that provides detailed, LLM-friendly documentation for the PandasAI library. The documentation is structured to be easily consumable by both LLMs and developers, significantly improving the developer experience.

What's Included

🔧 Complete API Reference

  • Agent Class: Main interaction interface with all methods and properties
  • DataFrame Class: Enhanced pandas DataFrame with natural language querying
  • Config Class: Comprehensive configuration management
  • VirtualDataFrame: Database connection handling
  • Connectors: SQL and NoSQL database integrations

💡 Practical Examples

  • Code snippets for all major use cases
  • Database connector examples (MySQL, PostgreSQL, SQLite, MongoDB)
  • LLM integration patterns (OpenAI, Anthropic, Google, Azure)
  • Configuration examples and best practices

🎯 Key Features

  • Structured Format: Easy navigation and reference
  • Code Examples: Practical usage patterns
  • Parameter Details: Complete parameter documentation
  • Best Practices: Recommended usage patterns
  • Error Handling: Common pitfalls and solutions

Benefits

  1. Improved Developer Experience: Developers can quickly understand and implement PandasAI features
  2. LLM-Friendly: Structured format allows LLMs to provide better assistance
  3. Comprehensive Coverage: All major classes and methods documented
  4. Practical Focus: Real-world examples and use cases
  5. Maintainable: Clear structure for future updates

Changes Made

  • ✅ Enhanced existing LLM.md with comprehensive API documentation
  • ✅ Added practical code examples for all major features
  • ✅ Structured content for optimal LLM consumption
  • ✅ Included database connector examples
  • ✅ Added configuration best practices

Testing

The documentation has been:

  • ✅ Reviewed for accuracy against the current codebase
  • ✅ Structured for optimal readability
  • ✅ Tested with LLM consumption patterns

Note: This contribution follows the project's contribution guidelines and aims to improve the overall developer experience with PandasAI.

A developer on Askdev.AI requested this update


Important

Adds LLM.md with comprehensive, LLM-friendly documentation for PandasAI, including API references, examples, and best practices.

  • Documentation:
    • Adds LLM.md with comprehensive API documentation for PandasAI.
    • Includes detailed descriptions of Agent, DataFrame, Config, VirtualDataFrame, and Connectors.
    • Provides practical examples for database connectors, LLM integration, and custom functions.
  • Features:
    • Structured format for easy navigation and LLM consumption.
    • Includes code snippets, parameter details, and best practices.
    • Covers error handling, memory management, and security features.
  • Testing:
    • Documentation reviewed for accuracy and structured for readability.
    • Tested with LLM consumption patterns.

This description was created by Ellipsis for 43cd485. You can customize this summary. It will automatically update as commits are pushed.

This commit adds a comprehensive LLM.md file that provides:
- Complete API reference for all major classes and methods
- Practical usage examples with code snippets
- Configuration options and best practices
- Database connector examples
- LLM integration patterns

The documentation is structured to be easily consumable by LLMs
and developers, improving the overall developer experience.
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed everything up to 43cd485 in 1 minute and 49 seconds. Click for details.
  • Reviewed 460 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. LLM.md:4
  • Draft comment:
    Consider capitalizing 'MongoDB' and 'NoSQL' for consistency.
  • Reason this comment was not posted:
    Marked as duplicate.
2. LLM.md:364
  • Draft comment:
    In the Custom Response Parser example, 'processed_response' is returned but not defined. Clarify that this is a placeholder.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% This is a documentation example showing how to create a custom parser. The code is clearly an example template, with "Custom parsing logic" as a comment placeholder. The variable processed_response being undefined is part of the template nature of the example. Adding "# placeholder variable" doesn't add meaningful value since it's already clear this is example code. The comment is technically correct that processed_response is undefined. Documentation should be clear and not confuse readers. The example's nature as a template is already clear from context - it has a "Custom parsing logic" comment placeholder and is in a documentation example section. Adding "# placeholder" is redundant and makes the example more cluttered. Delete the comment. The example code's template nature is already clear from context and adding a "placeholder" comment would just add noise to a documentation example.

Workflow ID: wflow_yYMIwHLMuJpSXbpm

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

config = Config(llm=llm, verbose=True)
```

This documentation covers the complete PandasAI v3 API. For the latest updates, visit the [official documentation](https://docs.getpanda.ai/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a trailing newline at the end of the file.

# PandasAI Library API Documentation

**Version:** 3.0.0-beta.19
**Description:** Chat with your database (SQL, CSV, pandas, mongodb, noSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typographical suggestion: In the description on line 4, consider using consistent casing for database types. Instead of "mongodb, noSQL", it might be clearer as "MongoDB, NoSQL".

Suggested change
**Description:** Chat with your database (SQL, CSV, pandas, mongodb, noSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.
**Description:** Chat with your database (SQL, CSV, pandas, MongoDB, NoSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.

This comment was generated because it violated a code review rule: mrule_kO2c9rTcwkbqZtg4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant