Skip to content
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

[RFC] Data Analysis Toolkit #182

Open
tonxxd opened this issue Nov 19, 2024 · 1 comment
Open

[RFC] Data Analysis Toolkit #182

tonxxd opened this issue Nov 19, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@tonxxd
Copy link

tonxxd commented Nov 19, 2024

Is your feature request related to a problem? Please describe.
This feature proposal introduces a toolkit for SQL and data analysis, by enhancing current SQL tool and introducing few other concepts

Describe the solution you'd like

The SQL Toolkit will include:

  • SQLMetadataTool: Extract and print metadata, with optional schema linking.
  • SQLValuesSearchTool: Search for relevant filter values.
  • SQLExecuteTool: Execute queries safely, flagging/blocking risky ones.
  • SQLGetExamplesTool: Enhance accuracy using an array of example queries.
  • SQLCorrect (Tentative): Initially part of SQLExecute to provide query correction.

The Data Analysis Toolkit will include:

  • SQLToolkit (as above).
  • PythonTool: Automatically include Python capabilities.
  • ExcelAdvancedParser: Parse and convert large or complex Excel files into SQLite for advanced querying.

Describe alternatives you've considered
Adding tools individually, which lacks the flexibility and easy of use of a unified toolkit.
Creating a new Specialized Agent without the concept of toolkit.


Additional context
Part of the FlowPilot team's contribution to Bee.
Initial draft PR in progress.

Example

import { DataAnalysisToolkit } from "bee-agent-framework/toolkits/dataAnalysis";

const toolkit = new DataAnalysisToolkit({
   ...optional tools options
})



const agent = new BeeAgent({
  llm,
  memory: new UnconstrainedMemory(),
  templates: {
    system: BeeSystemPrompt.fork((old) => ({
      ...old,
      template: toolkit.getPrompt("system")
    })),
    thought: BeeThoughtPrompt.fork((old) => ({
      ...old,
      template: toolkit.getPrompt("thought")
    })),
  },
  tools: [
    new DuckDuckGoSearchTool({
      maxResults: 10,
      search: {
        safeSearch: DuckDuckGoSearchToolSearchType.STRICT,
      },
    }),
    ...toolkit.getTools()
  ],
});
@tonxxd
Copy link
Author

tonxxd commented Nov 21, 2024

It seems Claude uses javascript to analyze and render charts, it might be less powerful but easier to integrate with bee builder
https://www.anthropic.com/news/analysis-tool
Screenshot 2024-11-21 at 10 42 27

@Tomas2D Tomas2D added enhancement New feature or request question Further information is requested labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants