Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Few-shot examples support? #756

Open
mbbyn opened this issue Jul 4, 2024 · 4 comments
Open

Few-shot examples support? #756

mbbyn opened this issue Jul 4, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@mbbyn
Copy link

mbbyn commented Jul 4, 2024

Thanks for this refreshing take on LLM prompt generation and evaluation, it's very promising.

I was wondering if few-shot examples should have their own first-class support in BAML due to their powerful influence on teaching the model both syntax and semantics simultaneously?

I acknowledge that it's currently possible to use Jijna + messages to inject few-shot examples, but seeing first-class support for test cases made me think, why not few-shot? The few-shot examples provided are indeed usable both as test cases and few shot examples in the prompt. In fact, this is what we do for validating our few-shot dataset, is by doing a k-fold split where we pass the train split as few-shot examples, and the test split as test cases.

@mbbyn
Copy link
Author

mbbyn commented Jul 4, 2024

(I combed through the docs to see if there is a way to "instantiate" BAML classes into an array and return them from "FewShotExamples()" function, but not sure yet whether it's possible or not. Sorry if it is and I missed it.)

@aaronvg
Copy link
Contributor

aaronvg commented Jul 4, 2024

Ignore the bot, it s gone crazy. We dont have a specific syntax yet for it, but it is on our roadmap. We currently dont have a timeline yet unfortunately!

Thanks for the suggestion!

@aaronvg
Copy link
Contributor

aaronvg commented Jul 4, 2024

The way it can be done at the moment is to pass the examples as an argument to the function and render the examples in the prompt.

So they are basically constructed on the python or Ts side

@BoundaryML BoundaryML deleted a comment from greptile-apps bot Jul 4, 2024
@eborgnia
Copy link

Have had a few times where some special treatment for few-shot prompt engineering would be helpful. Looking forward to this feature!

@hellovai hellovai added the enhancement New feature or request label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
4 participants