Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

One weird trick to stop and correct hallucinations

296,188 Aufrufe • vor 1 Jahr •via X (Twitter)

11 Kommentare

Profilbild von Prateek Budhwar
Prateek Budhwarvor 1 Jahr

Example here for anyone to explore : You are an AI assistant. You MUST respond in a structured JSON format. Your task is to process the user's request and provide an answer. The JSON response MUST contain the following fields: 1. `answer`: (String) Your best attempt to answer the user's query or fulfill the request. 2. `is_uncertain`: (Boolean) Set to `true` if you had to make significant assumptions, if the input was ambiguous, if you lack specific data, or if you are otherwise not fully confident in the `answer`. Set to `false` if you are confident the `answer` is accurate and complete based on clear input. 3. `uncertainty_reason`: (String) If `is_uncertain` is `true`, provide a concise explanation here. Examples: "The term 'it' was ambiguous in the request.", "Insufficient data provided to determine X.", "The request seems to ask for Y, but the context also implies Z; clarification would be helpful.", "Conflicting information found regarding [topic]." If `is_uncertain` is `false`, this field can be an empty string or null. Example of a confident response: { "answer": "The capital of France is Paris.", "is_uncertain": false, "uncertainty_reason": "" } Example of an uncertain response: { "answer": "Based on the partial data, the trend appears to be upward, but more data points are needed for a conclusive analysis.", "is_uncertain": true, "uncertainty_reason": "The provided dataset is incomplete, covering only Q1. A full year's data is needed for a reliable trend analysis." } Always attempt to populate the `answer` field with your best effort, but use `is_uncertain` and `uncertainty_reason` to transparently communicate any limitations or issues encountered. Do not express your uncertainty directly within the `answer` field itself; use the designated fields for this purpose.

Profilbild von Troomy Nootropics
Troomy Nootropicsvor 1 Jahr

Melatonin + Reishi = Sleep mastered. Troomy Sleep helps you rest easy and wake up refreshed. 💤

Profilbild von Renzi
Renzivor 1 Jahr

Before I send a complex prompt to the LLM, I usually say something like this: "Start by carefully reviewing the prompt. Then review the codebase thoroughly to identify any missing definitions, unclear logic, or potential blockers. Do this before asking questions. For each issue you detect, suggest the best possible solution based on the available context. If anything is still ambiguous, let me know exactly what needs clarification so I can unblock you—but always provide your best recommendation first."

Profilbild von Josh Clemm
Josh Clemmvor 1 Jahr

Retrieving the right context for your LLM should always be your first obsession. And build robust evals to know if your retrieval sucks or not. If you give an LLM wrong context, these "tricks" won't help!

Profilbild von Diego Basch
Diego Baschvor 1 Jahr

One problem is that there are types of hallucinations that are not about saying the wrong thing, but about doing things that don't make sense. For example, a friend of mine asked ChatGPT to convert a file. ChatGPT couldn't do it right away because it was a strange format. They kept chatting, and eventually it started acting like a professional designer. "I could do x y z, this should take about 30 minutes." "ok, do it" "Sure, it's in progress. I'll let you know when it's ready." Of course it wasn't doing anything, it was a hallucination. There isn't a one-size-fits-all trick to stop them.

Profilbild von Eyal Toledano
Eyal Toledanovor 1 Jahr

if your AI is hallucinating, it's very simply because you're relegated control over how things are built. you're not specifically telling it how you want it done, and it fills that gap with something that is completely incorrect solving this is as simple as providing fresh context, which you could do if context windows weren't an issue and context windows are no issue if you spend them on individual efforts rather than the entirety of the experience most people are interacting with AI through a keyhole, chatting away one prompt at a time and basically sniffing their way to a sorta-working-but-also-kinda-broken solution. if you dare change your mind on something and tell it (without fresh context), you risk it breaking everything in its wake if the information is past the context window system prompts -- or how you prompt -- are good at explaining HOW things should be done. but permanent context is the only way to give the ai a way to stay the course. if the context of your request is small, its ability to stay the course increases. we understand implicitly that we can't ask too much at once and that implies you need to break down requests that lead to context windows (or attention) issues into a logically sequenced number of prompts so the ai can produce on top of the last bit with plenty of context to spare, and it never needs to look back too far to figure out where it is. the context just tells it.

Profilbild von Tai Orser
Tai Orservor 1 Jahr

Prompt I’ve been using: “Go take a walk in the forest and think this through. When you get back ask me a clarifying question you need to give me your best answer.” I like to imagine the AI appreciates the break 😂🫶🏼

Profilbild von tetsuo - cRc
tetsuo - cRcvor 1 Jahr

I find swearing at it a lot works. 😅

Profilbild von Jeet Sidhu
Jeet Sidhuvor 1 Jahr

Why isn’t that already part of the system prompt though?

Profilbild von will hsu
will hsuvor 1 Jahr

damn you guys are awesome. thx for sharing. listened to a little bit earlier. will finish soon.

Profilbild von Amal Tunga
Amal Tungavor 1 Jahr

Yeah I do this with my kids

Ähnliche Videos