Skip to content

Commit

Permalink
Correct prompt typo + update example for SQLDatabaseChain (langchain-…
Browse files Browse the repository at this point in the history
  • Loading branch information
zachschillaci27 committed Mar 8, 2023
1 parent 6859892 commit 74ac2c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions docs/modules/chains/examples/sqlite.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
"llm = OpenAI(temperature=0)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "3d1e692e",
"metadata": {},
"source": [
"**NOTE:** For data-sensitive projects, you can specify `return_direct=True` in the `SQLDatabaseChain` initialization to directly return the output of the SQL query without any additional formatting. This prevents the LLM from seeing any contents within the database. Note, however, the LLM still has access to the database scheme (i.e. dialect, table and key names) by default."
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand Down
2 changes: 1 addition & 1 deletion langchain/chains/sql_database/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
template=_DEFAULT_TEMPLATE,
)

_DECIDER_TEMPLATE = """Given the below input question and list of potential tables, output a comma separated list of the table names that may be neccessary to answer this question.
_DECIDER_TEMPLATE = """Given the below input question and list of potential tables, output a comma separated list of the table names that may be necessary to answer this question.
Question: {query}
Expand Down

0 comments on commit 74ac2c9

Please sign in to comment.