langchain/docs/modules/chains
Jon Luo 0a1b1806e9
sql: do not hard code the LIMIT clause in the table_info section (#1563)
Seeing a lot of issues in Discord in which the LLM is not using the
correct LIMIT clause for different SQL dialects. ie, it's using `LIMIT`
for mssql instead of `TOP`, or instead of `ROWNUM` for Oracle, etc.
I think this could be due to us specifying the LIMIT statement in the
example rows portion of `table_info`. So the LLM is seeing the `LIMIT`
statement used in the prompt.
Since we can't specify each dialect's method here, I think it's fine to
just replace the `SELECT... LIMIT 3;` statement with `3 rows from
table_name table:`, and wrap everything in a block comment directly
following the `CREATE` statement. The Rajkumar et al paper wrapped the
example rows and `SELECT` statement in a block comment as well anyway.
Thoughts @fpingham?
2023-03-13 23:08:27 -07:00
..
examples sql: do not hard code the LIMIT clause in the table_info section (#1563) 2023-03-13 23:08:27 -07:00
generic Harrison/memory refactor (#1478) 2023-03-07 07:59:37 -08:00
async_chain.ipynb Add Qdrant named arguments (#1386) 2023-03-02 07:05:14 -08:00
generic_how_to.rst Feature: linkcheck-action (#534) (#542) 2023-01-04 21:39:50 -08:00
getting_started.ipynb (rfc) chat models (#1424) 2023-03-06 08:34:24 -08:00
how_to_guides.rst improve docs for indexes (#1146) 2023-02-19 23:14:50 -08:00
key_concepts.md add concept of prompt collection (#1507) 2023-03-08 08:31:29 -08:00
utility_how_to.rst Harrison/new api chain (#623) 2023-01-15 18:34:43 -08:00