HN user

sandkoan

128 karma

https://govindgnana.com , https://blog.govindgnana.com

Posts24
Comments70
View on HN
quorablog.quora.com 2y ago

New Funding from Andreessen Horowitz

sandkoan
5pts1
automorphic.ai 3y ago

Can you beat our firewall?

sandkoan
2pts0
blog.govindgnana.com 3y ago

Anything Can Be a Weekend Hack

sandkoan
2pts0
automorphic.ai 3y ago

Show HN: Structured output from LLMs without reprompting

sandkoan
174pts54
readymag.com 3y ago

Words: The Programming Language for Ideas

sandkoan
2pts0
automorphic.ai 3y ago

$100 If You Can Beat Our Firewall and Trick Our Model

sandkoan
2pts0
blog.govindgnana.com 3y ago

Anything Can Be a Weekend Hack

sandkoan
2pts0
automorphic.ai 3y ago

Show HN: Firewall for LLMs–Guard Against Prompt Injection, PII Leakage, Toxicity

sandkoan
17pts7
www.mosaicml.com 3y ago

Databricks acquires OpenAI Competitor MosaicML for 1.3B

sandkoan
3pts0
inflection.ai 3y ago

Inflection – A Personal AI

sandkoan
1pts0
socrates.govindgnana.com 3y ago

Show HN: Converse with Books as If They Were People

sandkoan
11pts2
blog.govindgnana.com 3y ago

Meditations on the Devil and Deep Sea Dilemma

sandkoan
2pts0
blog.govindgnana.com 3y ago

The Tortoise and the Hare, Revisited

sandkoan
1pts0
arxiv.org 3y ago

Git: A Generative Image-to-Text Transformer for Vision and Language

sandkoan
2pts0
www.aims.gov.au 3y ago

Spawn, grow, sow: how coral seeding could boost recovery

sandkoan
1pts0
huggingface.co 3y ago

Show HN: Athelas – Automagically Repair Broken Code

sandkoan
8pts0
9a766a8e-f818-4a63.gradio.live 3y ago

Show HN: Athelas – Self-Healing Code

sandkoan
5pts1
www.microsoft.com 3y ago

Concurrent Revisions

sandkoan
1pts0
news.ycombinator.com 3y ago

Ask HN: What's the most performant/practical model/API for text extraction?

sandkoan
1pts1
aclanthology.org 3y ago

LLMS Can Be Poets Too: AI Writing Assistant and Constrained Text Generation

sandkoan
1pts0
www.intel.com 3y ago

Intel Introduces Real-Time Deepfake Detector

sandkoan
3pts0
www.cbsnews.com 3y ago

HelloFresh accused of using coconut milk obtained from monkey labor

sandkoan
3pts0
news.ycombinator.com 3y ago

Ask HN: How would you design a crypto exchange?

sandkoan
1pts1
github.com 3y ago

Show HN: A Commandline Conjugator

sandkoan
2pts0

You wouldn't actually want to, because you'd be losing generalizability, and it's a lot of unnecessary work.

I think approach #1 outlined above is the better (more cost- and time-efficient) technique—where a pretrained model already understands JSON (among myriad other formats), and you merely constrain it at text-gen time to valid JSON (or other format).

The prompt is given to our model as a guiding aid (a suggestion), and the cfg is used to constrain the model to generate only tokens that abide by the schema (an enforcement). That's how we ensure only valid outputs at text generation time.

We also prefill some tokens depending on the set of allowed tokens at a given state, so the model doesn't waste resources trying to predict them.

Problems with OpenAI:

1) You're wasting GPT tokens on outputting JSON instead of meaningful information.

2) GPT functions won't, with absolute, 100% certainty, return JSON in the schema you want. In 1% to 3% of cases it hallucinates fields, etc.

3) This also allows you to output data in arbitrary non-JSON formats.

4) You can't self-host OpenAI functions.

We enable conforming to arbitrary context free grammars in addition to regex patterns, and have a bunch of speed optimizations, as well.

Though it may not seem too fast right now on account of the hundreds of simultaneous requests we're getting :)

Wholeheartedly agree—it adds layers of bloat and abstraction between you and the actual ReAct pattern, which can be trivially implemented in maybe 50 sloc.