Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/oss/langchain/sql-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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:

Expand Down