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

Update sql-agent-i5O-case-study notebook #407

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

Conversation

Anirudh31415926535
Copy link
Contributor

@Anirudh31415926535 Anirudh31415926535 commented Feb 12, 2025

This PR introduces a tutorial on creating a SQL agent using Cohere and LangChain. The agent translates natural language queries into SQL, enabling intuitive database interaction without direct SQL knowledge.

Key Changes:

  • Importing Libraries: The PR imports necessary libraries for creating the SQL agent, including langchain_cohere, langchain_community, and langchain_core.
  • Initializing LangChain SQL Toolkit: The LangChain SQL Toolkit is initialized, preparing components for querying the SQL database using natural language.
  • Creating Prompt Template: A prompt template is introduced, providing context and instructions to the model for generating accurate SQL statements.
  • Adding Memory to the Agent: The PR adds memory to the agent, allowing it to store and utilize previous messages for coherent conversations.
  • Testing the Agent: The agent is tested with various queries, demonstrating its ability to interpret natural language and generate SQL queries.

@Anirudh31415926535 Anirudh31415926535 requested a review from a team as a code owner February 12, 2025 07:35
Copy link

Copy link
Contributor

@harry-cohere harry-cohere left a comment

Choose a reason for hiding this comment

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

Thanks!

fern/pages/cookbooks/sql-agent-cohere-langchain.mdx Outdated Show resolved Hide resolved
fern/pages/cookbooks/sql-agent-cohere-langchain.mdx Outdated Show resolved Hide resolved
fern/pages/cookbooks/sql-agent-cohere-langchain.mdx Outdated Show resolved Hide resolved
fern/pages/cookbooks/sql-agent-cohere-langchain.mdx Outdated Show resolved Hide resolved
Anirudh31415926535 and others added 4 commits February 12, 2025 21:29
Co-authored-by: harry-cohere <127103098+harry-cohere@users.noreply.github.com>
Signed-off-by: Anirudh31415926535 <anirudh@cohere.com>
Co-authored-by: harry-cohere <127103098+harry-cohere@users.noreply.github.com>
Signed-off-by: Anirudh31415926535 <anirudh@cohere.com>
Co-authored-by: harry-cohere <127103098+harry-cohere@users.noreply.github.com>
Signed-off-by: Anirudh31415926535 <anirudh@cohere.com>
Co-authored-by: harry-cohere <127103098+harry-cohere@users.noreply.github.com>
Signed-off-by: Anirudh31415926535 <anirudh@cohere.com>
Copy link

Copy link

Copy link

Copy link

@Anirudh31415926535 Anirudh31415926535 requested a review from a team as a code owner February 13, 2025 09:01
Copy link

Copy link

Copy link

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.

5 participants