Uploaded image for project: 'Python Integrations'
  1. Python Integrations
  2. INTPYTHON-275

LangChain: Natural language to MQL Database tool

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: AI/ML
    • None
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Provide a MQL Database tool in LangChain.

      LangChain provides a range of agents and toolkits that enable interaction with different tools. For instance, LangChain offers SQL Database Tool, which can be used to interact with SQL databases. These tools are then utilized by LLMs (Large Language Models) such as GPT-4 to perform a series of tasks as an agent.

      Retrieving data from MongoDB using a Natural Language query can be difficult when the data is stored in collections without vectors. To perform this we prompt the LLM with database schema, and user query has is described in the doc https://docs.google.com/document/d/1A5qFxFUtEkwk7dQfYn7nxFrziiJMpXkDAJcViveMPzY/edit. MongoDB Compass has a Natural Language query feature which is in the beta version, which uses similar methodology.

      The scope of this work is
      (a) Create a brief design doc and get review from the product stakeholders
      (b) Commit code based on lgtm'ed design doc for MQL_agent_tool similar to code in `langchain_community.agent_toolkits.create_sql_agent`

            Assignee:
            Unassigned Unassigned
            Reporter:
            prakul.agarwal@mongodb.com Prakul Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: