New ask Hacker News story: Ask HN: How do you add guard rails in LLM response without breaking streaming?

Ask HN: How do you add guard rails in LLM response without breaking streaming?
3 by curious-tech-12 | 1 comments on Hacker News.
Hi all, I am trying to build a simple LLM bot and want to add guard rails so that the LLM responses are constrained. I tried adjusting system prompt but the response does not always honour the instructions from prompt. I can manually add validation on the response but then it breaks streaming and hence is visibly slower in response. How are people handling this situation?

Comments

Popular posts from this blog

New ask Hacker News story: Tell HN: Equifax free credit report dark patterns

New ask Hacker News story: Ask HN: Why can't the US government run their own social media?