<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: okhat</title><link>https://news.ycombinator.com/user?id=okhat</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Mon, 28 Sep 2026 01:06:43 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=okhat" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by okhat in "GEPA: Reflective prompt evolution can outperform reinforcement learning"]]></title><description><![CDATA[
<p>This is a DSPy optimizer, built by the DSPy core team. Just wait for open sourcing.</p>
]]></description><pubDate>Thu, 31 Jul 2025 13:13:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=44745305</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=44745305</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44745305</guid></item><item><title><![CDATA[New comment by okhat in "Show HN: RAGatouille, a simple lib to use&train top retrieval models in RAG apps"]]></title><description><![CDATA[
<p>I'll admit even I sometimes wish ColBERT was more user-friendly. I'll probably start using ColBERT throught RAGatouille now.</p>
]]></description><pubDate>Thu, 04 Jan 2024 16:51:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=38869260</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=38869260</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38869260</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>Writing right now. This month :-)</p>
]]></description><pubDate>Thu, 07 Sep 2023 19:29:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=37424351</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37424351</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37424351</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>Thanks! Lots to discuss from your excellent response, but I'll address the easy part first: DSPy is v2 of DSP (demonstrate-search-predict).<p>The DSPy paper hasn't been released yet. DSPy is a completely different thing from DSP. It's a superset. (We actually implemented DSPy _using_ DSPv1. Talk about bootstrapping!)<p>Reading the DSPv1 paper is still useful to understand the history of these ideas, but it's not a complete picture. DSPy is meant to be much cleaner and more automatic.</p>
]]></description><pubDate>Thu, 07 Sep 2023 18:49:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=37423746</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37423746</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37423746</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>@wokwokwok Okay now we disagree.
This task is not easy, it's just easy to follow in one notebook. (If it were easy, the RAG score wouldn't be 26%.)<p>As for "carefully crafted string templates", I'm not sure what your argument here is. Are you saying you could have spent a few hours of trial and error writing 3 long prompts in a pipeline, until you matched what the machine does in 60 seconds?<p>Yes, you probably could have :-)</p>
]]></description><pubDate>Thu, 07 Sep 2023 16:10:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=37421135</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37421135</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37421135</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>Ah okay makes sense, yeah we'll release more examples.<p>This is just an intro to the key concepts/modules.</p>
]]></description><pubDate>Thu, 07 Sep 2023 15:54:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=37420843</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37420843</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37420843</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>What did you find underwhelming if I may ask?<p>It shows you how it takes some ~25 Pythonic lines of code to make GPT-3.5 retrieval accuracy go from the 26-36% range to 60%.<p>Not a bad deal when you apply it to your own problem?</p>
]]></description><pubDate>Thu, 07 Sep 2023 15:34:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=37420494</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37420494</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37420494</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>Posted an answer here: <a href="https://news.ycombinator.com/item?id=37420175">https://news.ycombinator.com/item?id=37420175</a></p>
]]></description><pubDate>Thu, 07 Sep 2023 15:31:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=37420423</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37420423</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37420423</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>Here's the key idea.<p>You give DSPy (1) your free-form code with declarative calls to LMs, (2) a few inputs [labels optional], and (3) some validation metric [e.g., sanity checks].<p>It simulates your code on the inputs. When there's an LM call, it will make one or more simple zero-shot calls that respect your declarative signature. Think of this like a more general form of "function calling" if you will. It's just trying out things to see what passes your validation logic, but it's a highly-constrained search process.<p>The constraints enforced by the signature (per LM call) and the validation metric allow the compiler [with some metaprogramming tricks] to gather "good" and "bad" examples of execution for <i>every</i> step in which your code calls an LM. Even if you have no labels for it, because you're just exploring different pipelines. (Who has time to label each step?)<p>For now, we throw away the bad examples. The good examples become potential demonstrations. The compiler can now do an optimization process to find the best combination of these <i>automatically bootstrapped</i> demonstrations in the prompts. Maybe the best on average, maybe (in principle) the predicted best for a specific input. There's no magic here, it's just optimizing your metric.<p>The same bootstrapping logic lends itself (with more internal metaprogramming tricks, which you don't need to worry about) to finetuning models for your LM calls, instead of prompting.<p>In practice, this works really well because even tiny LMs can do powerful things when they see a few well-selected examples.</p>
]]></description><pubDate>Thu, 07 Sep 2023 15:16:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=37420175</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37420175</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37420175</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>These are answers to specific questions below.</p>
]]></description><pubDate>Thu, 07 Sep 2023 14:44:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=37419629</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37419629</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37419629</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>just posted a top-level answer, copied from the FAQs of DSPy</p>
]]></description><pubDate>Thu, 07 Sep 2023 14:40:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=37419575</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37419575</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37419575</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>See the discussion of teleprompters here:<p><a href="https://colab.research.google.com/github/stanfordnlp/dspy/blob/main/intro.ipynb" rel="nofollow noreferrer">https://colab.research.google.com/github/stanfordnlp/dspy/bl...</a></p>
]]></description><pubDate>Thu, 07 Sep 2023 14:04:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=37419079</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37419079</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37419079</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>"print out every prompt that is generated to a log" --- yes of course<p>This Colab is full of prompts and examples of improving the quality of gpt-3.5-turbo: <a href="https://t.co/Oa1RDp3XbZ" rel="nofollow noreferrer">https://t.co/Oa1RDp3XbZ</a><p>Paper incoming, but basically we've seen > 50% quality gains by just compiling in various settings.<p>This Twitter/X thread discusses doing a simple program for Llama2, with massive quality gains too: <a href="https://twitter.com/lateinteraction/status/1694748401374490946" rel="nofollow noreferrer">https://twitter.com/lateinteraction/status/16947484013744909...</a></p>
]]></description><pubDate>Thu, 07 Sep 2023 13:58:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=37419003</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37419003</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37419003</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>@simonw it sounds like we'd agree that:<p>1] when prototyping, it's useful to not have to tweak each prompt by hand as long as you can inspect them easily<p>2] when the system design is "final", it's important to be able to tweak any prompts or finetunes with full flexibility<p>But we may or may not agree on:<p>3] automatic optimization can basically make #2 above only very rarely needed<p>---<p>Anyway, the entire DSPy project has zero hard-coded prompts for tasks. It's all bootstrapped and validated for your logic. In case you're worried that we're doing some opinionated prompting on your behalf.</p>
]]></description><pubDate>Thu, 07 Sep 2023 13:50:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=37418893</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37418893</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37418893</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>btw read a more official answer here:<p><a href="https://github.com/stanfordnlp/dspy#5a-dspy-vs-thin-wrappers-around-prompts-openai-api-minichain-basic-templating-etc">https://github.com/stanfordnlp/dspy#5a-dspy-vs-thin-wrappers...</a></p>
]]></description><pubDate>Thu, 07 Sep 2023 13:36:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=37418717</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37418717</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37418717</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>"A neural network layer is just a matrix. Why abstract that matrix and learn it?" Well, because it's not your job to figure out how to hardcode delicate string or floats that work well for a given architecture & backend.<p>We want developers to iterate quickly on system designs: How should we break down the task? Where do we call LMs? What should they do?<p>---<p>If you can guess the right prompts right away for each LLM, tweak them well for any complex pipeline, and rarely have to change the pipeline (and hence all prompts in it), then you probably won't need this.<p>That said, it turns out that (a) prompts that work well are very specific to particular LMs, large & especially small ones, (b) prompts that work well change significantly when you tweak your pipeline or your data, and (c) prompts that work well may be long and time-consuming to find.<p>Oh, and often the prompt that works well changes for different inputs. Thinking in terms of strings is a glaring anti-pattern.</p>
]]></description><pubDate>Thu, 07 Sep 2023 13:21:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=37418533</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37418533</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37418533</guid></item><item><title><![CDATA[New comment by okhat in "DSPy: Framework for programming with foundation models"]]></title><description><![CDATA[
<p>DSPy provides composable and declarative modules for instructing LMs in a familiar Pythonic syntax and an automatic compiler that teaches LMs how to conduct the declarative steps in your program. Specifically, the DSPy compiler will internally trace your program and then craft high-quality prompts for large LMs (or train automatic finetunes for small LMs) to teach them the steps of your task.</p>
]]></description><pubDate>Thu, 07 Sep 2023 12:04:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=37417699</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37417699</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37417699</guid></item><item><title><![CDATA[DSPy: Framework for programming with foundation models]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/stanfordnlp/dspy">https://github.com/stanfordnlp/dspy</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=37417698">https://news.ycombinator.com/item?id=37417698</a></p>
<p>Points: 141</p>
<p># Comments: 52</p>
]]></description><pubDate>Thu, 07 Sep 2023 12:04:02 +0000</pubDate><link>https://github.com/stanfordnlp/dspy</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=37417698</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37417698</guid></item><item><title><![CDATA[New comment by okhat in "Re-implementing LangChain in 100 lines of code"]]></title><description><![CDATA[
<p>There’s always DSP for those who need a lightweight but powerful programming model — not a library of predefined prompts and integrations.<p>It’s a very different experience from the hand-holding of LangChain, but it packs reusable magic in generic constructs like annotate, compile, etc that work with arbitrary programs.<p><a href="https://github.com/stanfordnlp/dsp/">https://github.com/stanfordnlp/dsp/</a></p>
]]></description><pubDate>Fri, 05 May 2023 01:59:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=35824459</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=35824459</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=35824459</guid></item><item><title><![CDATA[New comment by okhat in "Prompt Engine – Microsoft's prompt engineering library"]]></title><description><![CDATA[
<p>Very cool! But for hard enough problems, prompt engineering is kind of like hyperparameter tuning. It's only a final (and relatively minor) step after building up an effective architecture and getting its modules to work together.<p>DSP provides a high-level abstraction for building these architectures—with LMs and search. And it gets the modules working together on your behalf (e.g., it annotates few-shot demonstrations for LM calls automatically).<p>Once you're happy with things, it can <i>compile</i> your DSP program into a tiny LM that's a lot cheaper to work with.<p><a href="https://github.com/stanfordnlp/dsp/">https://github.com/stanfordnlp/dsp/</a></p>
]]></description><pubDate>Thu, 16 Feb 2023 10:35:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=34817066</link><dc:creator>okhat</dc:creator><comments>https://news.ycombinator.com/item?id=34817066</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34817066</guid></item></channel></rss>