diff --git a/src/oss/langchain/sql-agent.mdx b/src/oss/langchain/sql-agent.mdx index c519d2cf3..ff27bbede 100644 --- a/src/oss/langchain/sql-agent.mdx +++ b/src/oss/langchain/sql-agent.mdx @@ -197,7 +197,7 @@ async function getSchema() { ::: :::python -## 5. Use `create_agent` +## 4. Use `create_agent` Use @[`create_agent`] to build a [ReAct agent](https://arxiv.org/pdf/2210.03629) with minimal code. The agent will interpret the request and generate a SQL command, which the tools will execute. If the command has an error, the error message is returned to the model. The model can then examine the original request and the new error message and generate a new command. This can continue until the LLM generates the command successfully or reaches an end count. This pattern of providing a model with feedback - error messages in this case - is very powerful. @@ -244,7 +244,7 @@ agent = create_agent( ) ``` -## 6. Run the agent +## 5. Run the agent Run the agent on a sample query and observe its behavior: