Replies: 2 comments 1 reply
-
I found a similar unsolved discussion that might be relevant to your question: Changing the template and adding customization in pandas_dataframe_agent of OpenAI(gpt-4 model) in langchain [1]. To train the model to generate meaningful insights from the dataframe and respond naturally, such as saying '100 patients' instead of '100 pt-ids', using the
This setup will allow the model to generate Python code to analyze the dataframe and provide a natural language response. By modifying the prompt template to include instructions for natural language responses, you can guide the model to produce more human-like answers [2][3][4]. |
Beta Was this translation helpful? Give feedback.
-
@dosu can I update my dataframe fields and it's descriptions in the 'For Example: session? what is the significance of that part?
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I am using the PythonAstREPLTool to query the dataframe and gain insights, utilizing the suggested code below. My objective is to have the bot respond to end users in a natural manner. For instance, my table field is labeled 'pt-id'. However, instead of the bot saying '100 pt-ids', I want it to say '100 patients'. The question is, where and how can I train the model to generate meaningful insights from the data? In llama-index, we used to define this in the 'response synthesis prompt'. Is there a similar method to train the LLM about our dataframe? Please help.
System Info
Name: langchain
Version: 0.2.16
Beta Was this translation helpful? Give feedback.
All reactions