TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

StructuredRAG: JSON Response Formatting with Large Language Models

38 点作者 bobvanluijt9 个月前

2 条评论

FlyingLawnmower9 个月前
Interesting paper, but their reason for dismissing constrained decoding methods seems to be that they want to academically study the in-context setting.<p>For practitioners, using a framework like Guidance which forces the models to write valid JSON as they generate text solves this trivially (<a href="https:&#x2F;&#x2F;github.com&#x2F;guidance-ai&#x2F;guidance">https:&#x2F;&#x2F;github.com&#x2F;guidance-ai&#x2F;guidance</a>)<p>For json in particular these frameworks have functions that take in json schemas or pydantic schemas <a href="https:&#x2F;&#x2F;guidance.readthedocs.io&#x2F;en&#x2F;latest&#x2F;generated&#x2F;guidance.json.html#guidance-json" rel="nofollow">https:&#x2F;&#x2F;guidance.readthedocs.io&#x2F;en&#x2F;latest&#x2F;generated&#x2F;guidance...</a>
评论 #41326096 未加载
评论 #41328157 未加载
l5870uoo9y9 个月前
&gt; It may additionally be promising to test Chain-of-Thought (CoT) prompting strategies. This entails adding a “rationale” key to the model’s output such that the additional reasoning improves the performance of the model. However, this will require the output to be a composite object with the additional &quot;rationale&quot; key and string-valued response. Our results suggest that this additional output structure may result in lower success rates. Similar in spirit to structured decoding methods, it may also be helpful to prefix the end of the prompt with “{“ or use the key, such as “{“paraphrased_questions”: [&quot;.<p>For most of my prompts I want CoT.