-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Environment details
- OS type and version: Linux
- Python version: 3.10
- pip version:
langchain-google-spannerversion 0.81
Solution
See PR: #175
How to reproduce it
intermediate_steps is the only way that you can instrument what queries fail and why. This is key when your are working on automated systems to improve the QA/Verify/Fix prompts of the library.
However, when you reach max max_gql_fix_retries an exception is thrown:
and then you do not get the intermediate_steps what prevents you to have the results of why the query has failed.
Request: please return intermediate_steps when there is an exception and intermediate_steps is true.
Why is this important:
- Makes difficult to collect insights when queries fail and you are developing automated evaluation
Possible solution
Consider creating your own Spanner exception which returns also intermediate_steps
Note: If you fix this case, consider reviewing other exceptions like
https://github.com/googleapis/langchain-google-spanner-python/blob/main/src/langchain_google_spanner/graph_qa.py#L322