TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Guidance: A guidance language for controlling large language models

103 pointsby bx376over 1 year ago

13 comments

simonwover 1 year ago
The thing I most want from this project is a technical explanation of what it&#x27;s actually doing for me and how it works.<p>I dug into this the other day, and just about figured out how the old text-davinci-003 version works.<p>When it runs against a text completion model (like text-davinci-003) the trick seems to be that it breaks your overall Mustache-templated program up into a sequence of prompts.<p>These are executed one at a time. Some of them will be open ended, but some of them will include restrictions based on the rules that you laid out.<p>So you might have a completion prompt that asks for a maximum of 1 token and uses the logit_bias argument to ensure that the returned value can only come from a specific set of tokens. That&#x27;s how you would answer a piece in the program that says &quot;next should be just the sequence &#x27;true&#x27; or &#x27;false&#x27;&quot; for example.<p>What I don&#x27;t yet understand is how it works against non-completion models. There are open issues complaining about broken examples using it with gpt-3.5-turbo for example.<p>And how does it work with models other than the OpenAI ones?
评论 #37540318 未加载
评论 #37546841 未加载
adamgordonbellover 1 year ago
Is this microsoft guidance? It looks like it is and they spun it out.<p>I find guidance to be fantastic for doing complicated prompting. I haven&#x27;t used the &#x27;controlling&#x27; the output feature as much as used it for chain prompting. Ask to come up with answers to a prompt N times, then discuss pros and cons of each answer, then make a new answer based on the best parts of the output. Stuff like that.
bugglebeetleover 1 year ago
I’ve found using a JSON schema and function calling, as described in this blog post, to be just as effective and less opaque than this library:<p><a href="https:&#x2F;&#x2F;blog.simonfarshid.com&#x2F;native-json-output-from-gpt-4" rel="nofollow noreferrer">https:&#x2F;&#x2F;blog.simonfarshid.com&#x2F;native-json-output-from-gpt-4</a><p>(it works perfectly with GPT-3.5 as well)
hexmanover 1 year ago
I found that the approach of template processing at large prompts leads to difficulty in reading programs. Their attractive part is that control flow is not separate from prompt as in langchain, which allows you to write prompts as classical programs. But the problem remains in unintuitive syntax for large programs
rckrdover 1 year ago
Logit-bias guidance goes a long way -- LLM structure for regex, context-free grammars, categorization, and typed construction. I&#x27;m working on a hosted and model-agnostic version of this with thiggle<p>[0] <a href="https:&#x2F;&#x2F;thiggle.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;thiggle.com</a>
lukasbover 1 year ago
Can anyone comment on how well this does at coercing json output vs OpenAI function calling?
评论 #37539890 未加载
评论 #37540234 未加载
guyrtover 1 year ago
I&#x27;ve been trying to figure out how projects like this, semantic kernel (also msft), and langchain add value. Is the paradigm sort of like a web framework? It reduces the boilerplate you need to write so you can focus on the business problem?<p>Is that needed in the LLM space yet? I&#x27;m just not convinced the abstraction pays for itself in reduced cognitive load, or at least not yet, but very happy to be convinced otherwise.
评论 #37542624 未加载
评论 #37540715 未加载
评论 #37539657 未加载
评论 #37539825 未加载
PUSH_AXover 1 year ago
The thing that’s bugging me about this eco system is the library, although it augments, has to become the thing running the LLM, I can’t use guidance as a plug-in on some other LLM system.<p>I look forward to when we have something that can run any LLM without compatibility issues, can expose APIs etc and has a robust plugin or augmentation system.
评论 #37542533 未加载
avereveardover 1 year ago
Is this alive? Last release June 21<p>There are many projects like these I&#x27;m tracking, but they all kinda cool off after the initial prototype and have thus many quirks and limitations<p>So far the only one that I could reliably use was llamacpp grammars, and those are fairly slow
评论 #37540353 未加载
评论 #37540199 未加载
gsuuonover 1 year ago
I&#x27;m hacking on a library (<a href="https:&#x2F;&#x2F;github.com&#x2F;gsuuon&#x2F;ad-llama">https:&#x2F;&#x2F;github.com&#x2F;gsuuon&#x2F;ad-llama</a>) inspired by guidance, but in TS and for the browser. I think structured inference and controlled sampling are really good ways of getting consistent responses out of LLM&#x27;s. It lets smaller models really punch above their weight.<p>I wonder what other folks are building on this sort of workflow? I&#x27;ve been playing around with it and trying to figure out interesting applications that weren&#x27;t possible before.
maccam912over 1 year ago
I&#x27;ve seen this link pop up in various places now, but it seems like it&#x27;s still mostly not being developed? Is there a reason it was posted today? Some new development in it?
评论 #37540123 未加载
ilovefoodover 1 year ago
I&#x27;ve been using this library a lot, it&#x27;s amazing. However, I noticed a very considerable degradation (time taken + generation quality) with versions &gt; 0.0.58 when used with local LLMs.<p>I haven&#x27;t taken time to compare between the different releases but if anyone is having the same type of issues, I recommend downgrading even if it might mean less features.
startupsfailover 1 year ago
This seems just a clone of Microsoft Guidance.
评论 #37540112 未加载