How to OPTIMIZE your prompts for better Reasoning!

  Рет қаралды 6,814

Sam Witteveen

Sam Witteveen

Күн бұрын

Пікірлер: 37
@choiswimmer
@choiswimmer 20 сағат бұрын
Id love a comparison between dspy and this! We should start evaluating frameworks
@samwitteveenai
@samwitteveenai 13 сағат бұрын
Just posted this above so reposting here This one certainly is a lot easier to use. Both TextGrad and DSPy really focus on treating it as if it were a deep learning network etc. For me, this one is probably better for people who don't have that kind of experience. I've been meaning to make an in-depth video about DSPy for a while, and just never gotten around to it, I do like it as a project.
@samwitteveenai
@samwitteveenai 13 сағат бұрын
I totally agree. It would be good to start doing some kind of evaluation by comparing all of these kinds of things to each other.
@abyssuserigo
@abyssuserigo 16 сағат бұрын
Love your videos man, this space is so noisy but your uploads are pure quality.
@samwitteveenai
@samwitteveenai 13 сағат бұрын
Thanks thats really appreciated
@thunkin-ai
@thunkin-ai 22 сағат бұрын
I’ve been thinking about this concept for a while; very glad there’s a concept out in the wild
@sitedev
@sitedev 17 сағат бұрын
I can see how something like this would be useful in a RAG pipeline where as new documents are added a LLM instance could create a base dataset representing the content of the document (or the entire knowledge base) and then use that with PW to create extensive prompts that are subsequently used to evaluate chunk/retrieval performance.
@tuliochiodi8642
@tuliochiodi8642 4 сағат бұрын
Thank you, Sam Witteveen, for this insightful video on PromptWizard! I really appreciate the effort you put into explaining its features. I had a question regarding my personal use case: I need to tune prompts that carry context variables retrieved during real-time execution. Can this framework handle such scenarios out of the box, or would it require additional customization? If so, how straightforward do you think it would be to implement this feature? Thanks in advance for your attention and for sharing your expertise!
@keclv
@keclv 20 сағат бұрын
Cool! I've just tried the example problems from the Colab notebook using my Llama3.2 3b with a simple prompt "Please solve the following problem:" All the results were correct, with nice concise reasoning steps. To justify the amount and cost of optimization I would like to see some counter examples showing what value this approach actually adds over the baseline.
@samwitteveenai
@samwitteveenai 13 сағат бұрын
I'm thinking of sticking Lite LLM support in there, and making it so that you could try it on any model, including local models, et cetera. That would make it much more effective cost-wise to be able to try things out
@ScottLahteine
@ScottLahteine 17 сағат бұрын
This tool looks like it could be extremely helpful for my needs. I have to extract documentation from a couple of source code files, organize it all into sections, and output a YAML representation. It’s hard to know where to begin to get an LLM accomplish this task. It needs to be decomposed into stages, and the LLM needs to have a peek at the documentation that it’s generating so it can improve phrasing, do language translation, etc., and within a small context window so the LLM doesn’t choke. I already have a parser written the old fashioned way that can extract individual items from the sources into a generic JSON or YAML format, so I just need that final step of leveraging the LLM. I can write a TOOL to grab any requested part of the JSON and test it within an environment like Open WebUI, but my brain is fuzzy on how to make a reliable system that can be reused. Any tool that helps refine the prompts, whether for the whole process or to build agents, is most welcome! I’m sure this is a common enough problem that there are already some services popping up. But this seems like a good learning opportunity.
@ergosumdre
@ergosumdre 2 сағат бұрын
Nice video!
@sepsi77
@sepsi77 23 сағат бұрын
How much did this cost in the end? Seems like this could use a lot of token?
@amandamate9117
@amandamate9117 22 сағат бұрын
a fortune
@thenoblerot
@thenoblerot 22 сағат бұрын
Enterprise and research don't seem to care about token counts, especially not if they're investing in RL datasets or will be saving tokens in deployment. 🔥💰 I clenched when Sam said he ran it for 20 minutes lol
@samwitteveenai
@samwitteveenai 22 сағат бұрын
Just checked, it wasn't that bad it was $13.70. I feel this is pretty reasonable if it is an important prompt etc. The dataset was not small as well. I was thinking of showing this with DeepSeekV3 or Gemini if there is interest which could make it much cheaper etc.
@sepsi77
@sepsi77 20 сағат бұрын
@ that’s very reasonable, thanks for the info.
@amandamate9117
@amandamate9117 5 сағат бұрын
obvious question: is this better or why is this better than just finetuning a model?
@HassanAllaham
@HassanAllaham Сағат бұрын
I believe that this framework costs less computation power than finetuning. Also, it can be used with the already-existing GGUF format that works well on consumer-grade hardware. It is like fine-tuning the system prompt to be suitable for a specific LLM and a specific domain of tasks (represented by a dataset) instead of LLM finetuning, which needs a high computation power (Powerful GPU). Also, LLM finetuning makes the LLM optimized only for a specific domain of tasks, while using this framework makes it possible to use the same general-purpose LLM for multi-domains of tasks by only generating the optimized system prompts. I believe finetuned LLM will provide better performance for specific task types especially where the right answers are not exact ones (I mean where there are many right answers for the same question)
@puremajik
@puremajik 15 сағат бұрын
Compare promptwizard to textgrad and dspy
@samwitteveenai
@samwitteveenai 13 сағат бұрын
This one certainly is a lot easier to use. Both TextGrad and DSPy really focus on treating it as if it were a deep learning network etc. For me, this one is probably better for people who don't have that kind of experience. I've been meaning to make an in-depth video about DSPy for a while, and just never gotten around to it, I do like it as a project.
@samwitteveenai
@samwitteveenai 13 сағат бұрын
Just curious - do you have any particular use cases for DSPy or TextGrad?
@d_b_
@d_b_ 23 сағат бұрын
Thank you for the insightful video. Could you elaborate on whether token usage is a concern for users when employing this framework? Also, would you say it’s only effective for specific tasks or use cases, rather than being broadly applicable? How feasible would it be for someone to develop a similar prompt optimization tool independently?
@samwitteveenai
@samwitteveenai 22 сағат бұрын
The cost wasn't super high it was $13.70 . You can certainly use it for your own tasks, it would work better for things where there is a clear correct answer. you could develop something like this yourself but this is totally open so you can leverage of this
@johang1293
@johang1293 20 сағат бұрын
Just making a simple tool to optimize your prompt to a lvl 3 or lvl 4 prompt will go and long way. Once you start to use lvl 3 and lvl 4 prompts you will really see what the llm is capable of.
@samuelcombey
@samuelcombey 22 сағат бұрын
Great job!✌ Colab link not working
@samwitteveenai
@samwitteveenai 22 сағат бұрын
I just checked it it should be ok. drp.li/58ni6
@RickySupriyadi
@RickySupriyadi 15 сағат бұрын
most of the time model under 8B quite confused using too long prompt am i the only one got that problem?
@cariyaputta
@cariyaputta 20 сағат бұрын
The iterative optimization part is essentially a genetics algorithm.
@samwitteveenai
@samwitteveenai 13 сағат бұрын
Yes, in that way it's quite similar to prompt breeder from DeepMind
@micbab-vg2mu
@micbab-vg2mu Күн бұрын
thanks - very usuful :)
@deadbeafc001
@deadbeafc001 Күн бұрын
seems like DSPy
@samwitteveenai
@samwitteveenai 23 сағат бұрын
indeed it is like DSPy but has some of the cool ideas from DeepMind's prompt breeder and is easier to use I would say
@hqcart1
@hqcart1 20 сағат бұрын
The problem is that this method does not work if you do not know the answer to the problem, or the answer might not be precise like this math. None of the real-worl apps I've seen can use this.
@samwitteveenai
@samwitteveenai 13 сағат бұрын
Yes, this is a really good point - it works best for things where there is a clear and correct answer. Using it for things like creative writing etc is probably not going to be as good. Ahem That said, I still think it can be used in certain kinds of real-world apps.
smolagents - HuggingFace's NEW Agent Framework
29:10
Sam Witteveen
Рет қаралды 22 М.
Retro MS-DOS Coding - Recreating the Iconic Award BIOS Screen
18:16
NCOT Technology
Рет қаралды 80 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Google's 9 Hour AI Prompt Engineering Course In 20 Minutes
20:17
Tina Huang
Рет қаралды 119 М.
How to make Muilt-Agent Apps with smolagents
22:08
Sam Witteveen
Рет қаралды 7 М.
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 417 М.
Multi-Agent AI EXPLAINED: How Magentic-One Works
16:39
Sam Witteveen
Рет қаралды 19 М.
The Only Unbreakable Law
53:25
Molly Rocket
Рет қаралды 353 М.
I Discovered The Perfect ChatGPT Prompt Formula
6:27
Skill Leap AI
Рет қаралды 1,1 МЛН
Open Reasoning vs OpenAI
26:59
Sam Witteveen
Рет қаралды 32 М.
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,2 МЛН
HashMaps & Dictionaries, Explained Simply
22:44
Nic Barker
Рет қаралды 8 М.
Building a Vision App with Ollama Structured Outputs
17:54
Sam Witteveen
Рет қаралды 13 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН