LaVague icon indicating copy to clipboard operation
LaVague copied to clipboard

Add error handling ability upon generated code error

Open y22ma opened this issue 10 months ago • 3 comments

Is your feature request related to a problem? Please describe. When code gets generated and it doesn't work, we throw an error and give up. The backtrace should provide very clear direction to fix the generated code and try to take another shot at it.

Describe the solution you'd like Add a error handling mechanism, where if code error is encountered, dump the error into the context and retool the code. This is a part of langchain out of the box, the equivalent for llamaindex would be Retry Query Engine.

Describe alternatives you've considered maybe robustness can be increased by providing many examples in context to steer the code gen output, but backtracking is additive.

y22ma avatar Apr 15 '24 20:04 y22ma