Guidance with select for top3 #642
pratikkumar018
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team,
I need some help in using select feature of guidance. Thanks in advance. I am trying to use guidance to select top 3 elements from a list (category_list). Elements should come only from the list(category_list). And for each element selected I have to output a confidence score. I have made an array for score_array=[0,10,20,30,40,50,60,70,80,90,100]
category_list=[cat1, cat2, cat3, cat4, cat5, cat6, cat7, cat8.....]
llama2=models.OpenAI(model,base_url=openai_api_base,api_key=openai_api_key,tokenizer=tokenizer)
lm=llama2 +'Select top 3 category from the given list & also output the confidence score respectively ' + select(category_list, name='test1')+', '+select(category_list, name='test2')+', '+select(category_list, name='test3') +']" , "category_score":['+select(score_array, name='score1')+","+select(score_array, name='score2')+","+select(score_array, name='score3')+']}'
But this is performing very poor. But when I do top1 instead of top3 performance is very good. Can you please help in drafting how I should be using this for top3
Beta Was this translation helpful? Give feedback.
All reactions