You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom prompt with structured output to describe an image input to text output. I was wondering if it is reasonable with respect to performance to include few shot prompting to add edge case and normal examples.
In case it is reasonable, how should I implement it? I was trying to create a system message prompt including the few shot examples but I don't know how to include the image input. The output are displayed in the system prompt as the json dump of the pyndatic model. I searched for this online and I found few examples here and there but never a complete example.
The provided example is not working because it seems returning the pyndatic model of the first few-shot examples. It was a try, trying to mix HumanMessage and SystemMessage to implement a sort of few-shot prompting "interactions".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I have a custom prompt with structured output to describe an image input to text output. I was wondering if it is reasonable with respect to performance to include few shot prompting to add edge case and normal examples.
In case it is reasonable, how should I implement it? I was trying to create a system message prompt including the few shot examples but I don't know how to include the image input. The output are displayed in the system prompt as the json dump of the pyndatic model. I searched for this online and I found few examples here and there but never a complete example.
The provided example is not working because it seems returning the pyndatic model of the first few-shot examples. It was a try, trying to mix HumanMessage and SystemMessage to implement a sort of few-shot prompting "interactions".
System Info
python 3.12.6
langchain-openai>=0.3.8
Beta Was this translation helpful? Give feedback.
All reactions