Skip to content

multi-shot prompting #580

Answered by Mr-Ruben
palako asked this question in Q&A
Apr 8, 2024 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

Here
(old) #653
(new) https://python.useinstructor.com/examples/examples

But you you can just add the examples on the prompt, together with the instructions and data. Except for the response_model, everything is the same as if Instructor were never there.

In fact, I have a function where I do this:

call1: prompt -> LLM  -> text_response  
call2: prompt (which is only the text_response)  -> LLM (with response_model) -> response_model_Object

I do this so that the 1st call has 'less work to do' when responding.
I know the retry may not work well as the original prompt is lost, but it works fine for me.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@Mr-Ruben
Comment options

Answer selected by jxnl
@pablospe
Comment options

@Mr-Ruben
Comment options

@pablospe
Comment options

@pablospe
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants