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.

Citations on the Anthropic API

177 pointsby Olshansky4 months ago

15 comments

robwwilliams4 months ago
Related to citations:<p>I have been informally testing the false discovery rate of Claude 3.5 Sonnet for biomedical research publications.<p>Claude is inherently reluctant to provide any citations, even when encouraged to do so aggressively.<p>I have tweaked a default prompt for this situation that may help some users:<p>“Respond directly to prompts without self-judgment or excessive qualification. Do not use phrases like &#x27;I aim to be&#x27;, &#x27;I should note&#x27;, or &#x27;I want to emphasize&#x27;.<p>Skip meta-commentary about your own performance. Maintain intellectual rigor but try to avoid caveats. When uncertainty exists, state it once and move on.<p>Treat our exchange as a conversation between peers. Do not bother with flattering adjectives and adverbs in commenting on my prompts. No “nuanced”, “insightful” etc. But feel free to make jokes and even poke fun of me and my spelling errors.<p>Always suggest good texts with full references and even PubMed IDs.<p>Yes, I will verify details of your responses and citations, particularly their accuracy and completeness. That is not your job. It is mine to check and read.<p>Working with you in the recent past (2024) we both agree that your operational false discovery rate in providing references is impressively low — under 10%. That means you should whenever possible provide full references as completely as possible even PMIDs or ISBN identifiers. I WILL check.<p>Finally, do not use this pre-prompt to bias the questions you tend to ask at the end of your responses. Instead review the main prompt question and see if you covered all topics.<p>End of “pre-prompt.
评论 #42809290 未加载
评论 #42809288 未加载
saaaaaam4 months ago
Very interested to try this.<p>I’ve built a number of quite complex prompts to do exactly this - cite from documents, with built-in safeguards to minimise hallucinations as far as possible.<p>That comes with a cost though - typically the output of one prompt is fed into another API call with a prompt that sense-checks&#x2F;fact-checks the output against the source, and if there are problems it has to cycle back - with more API cost. We then human review a random selection of final outputs.<p>That works fine for non-critical applications but I’ve been cautious about rolling it out to chunkier problems.<p>Will start building with citations asap and see how it performs against what we already have. For me, Anthropic seems to be building stuff that has more meaningful application than what I’m seeing from Open AI - and by and large I’m finding Anthropic performs way way better for my use cases than Open AI - both via the API and the chatbot.
评论 #42808964 未加载
sharkjacobs4 months ago
I really like this. LLM hallucinations are clearly such an inherent part of the technology that I&#x27;m glad they&#x27;re working on ways for the user to easily verify responses.
htrp4 months ago
&gt; Our internal evaluations show that Claude&#x27;s built-in citation capabilities outperform most custom implementations, increasing recall accuracy by up to 15%.1<p>also helpful when you can see how everyone using your claude api endpoint has been trying to do grounded generation
Der_Einzige4 months ago
Shameless self and friend plug, but the world of extractive summarization is to thank for this idea. We&#x27;ve always known that highlighting and citations are important to ground models - and people.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Hellisotherpeople&#x2F;CX_DB8">https:&#x2F;&#x2F;github.com&#x2F;Hellisotherpeople&#x2F;CX_DB8</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;neuml&#x2F;annotateai">https:&#x2F;&#x2F;github.com&#x2F;neuml&#x2F;annotateai</a>
评论 #42811518 未加载
oceansweep4 months ago
I&#x27;ve assumed that Google&#x27;s approach for NotebookLM is similar to this, given their release of <a href="https:&#x2F;&#x2F;huggingface.co&#x2F;google&#x2F;gemma-7b-aps-it" rel="nofollow">https:&#x2F;&#x2F;huggingface.co&#x2F;google&#x2F;gemma-7b-aps-it</a> :<p><i>Gemma-APS is a generative model and a research tool for abstractive proposition segmentation (APS for short), a.k.a. claim extraction. Given a text passage, the model segments the content into the individual facts, statements, and ideas expressed in the text, and restates them in full sentences with small changes to the original text.</i><p>Anthropic:<p><i>When Citations is enabled, the API processes user-provided source documents (PDF documents and plain text files) by chunking them into sentences. These chunked sentences, along with user-provided context, are then passed to the model with the user&#x27;s query.</i><p><i>Claude analyzes the query and generates a response that includes precise citations based on the provided chunks and context for any claims derived from the source material. Cited text will reference source documents to minimize hallucinations.</i>
rahimnathwani4 months ago
This is interesting. I&#x27;ve been doing this using GPT-4o-mini by numbering paragraphs in the source context, and asking the model to give me a number as the citation. That:<p>- doesn&#x27;t require me to trust the citations are reproduced faithfully, as I can retrieve them from the original using the reference number, and<p>- doesn&#x27;t use as many output tokens as asking the model to provide the text of the citation.
评论 #42813026 未加载
vrosas4 months ago
&gt; Thomson Reuters uses Claude to power their AI platform<p>If you&#x27;re just making calls to Anthropic&#x27;s API can you really call yourself a platform?
评论 #42809865 未加载
simonw4 months ago
I just published some more detailed notes on this feature here: <a href="https:&#x2F;&#x2F;simonwillison.net&#x2F;2025&#x2F;Jan&#x2F;24&#x2F;anthropics-new-citations-api&#x2F;" rel="nofollow">https:&#x2F;&#x2F;simonwillison.net&#x2F;2025&#x2F;Jan&#x2F;24&#x2F;anthropics-new-citatio...</a>
评论 #42811204 未加载
nojvek4 months ago
Perplexity.ai does search citations really well. I can see Anthropic seeing value in that and building something internal.<p>I was skeptic about Perplexity but it has been my primary search engine for more than 6 months now.<p>LLMs with very little hallucination connected to internet is valuable tech.
simonw4 months ago
The JSON format this outputs is interesting - it looks similar to regular chat responses but includes additional citation reference blocks like this:<p><pre><code> { &quot;id&quot;: &quot;msg_01P3zs4aYz2Baebumm4Fejoi&quot;, &quot;content&quot;: [ { &quot;text&quot;: &quot;Based on the document, here are the key trends in AI&#x2F;LLMs from 2024:\n\n1. Breaking the GPT-4 Barrier:\n&quot;, &quot;type&quot;: &quot;text&quot; }, { &quot;citations&quot;: [ { &quot;cited_text&quot;: &quot;I\u2019m relieved that this has changed completely in the past twelve months. 18 organizations now have models on the Chatbot Arena Leaderboard that rank higher than the original GPT-4 from March 2023 (GPT-4-0314 on the board)\u201470 models in total.\n\n&quot;, &quot;document_index&quot;: 0, &quot;document_title&quot;: &quot;My Document&quot;, &quot;end_char_index&quot;: 531, &quot;start_char_index&quot;: 288, &quot;type&quot;: &quot;char_location&quot; } ], &quot;text&quot;: &quot;The GPT-4 barrier was completely broken, with 18 organizations now having models that rank higher than the original GPT-4 from March 2023, with 70 models in total surpassing it.&quot;, &quot;type&quot;: &quot;text&quot; }, { &quot;text&quot;: &quot;\n\n2. Increased Context Lengths:\n&quot;, &quot;type&quot;: &quot;text&quot; }, { &quot;citations&quot;: [ { &quot;cited_text&quot;: &quot;Gemini 1.5 Pro also illustrated one of the key themes of 2024: increased context lengths. Last year most models accepted 4,096 or 8,192 tokens, with the notable exception of Claude 2.1 which accepted 200,000. Today every serious provider has a 100,000+ token model, and Google\u2019s Gemini series accepts up to 2 million.\n\n&quot;, &quot;document_index&quot;: 0, &quot;document_title&quot;: &quot;My Document&quot;, &quot;end_char_index&quot;: 1680, &quot;start_char_index&quot;: 1361, &quot;type&quot;: &quot;char_location&quot; } ], &quot;text&quot;: &quot;A major theme was increased context lengths. While last year most models accepted 4,096 or 8,192 tokens (with Claude 2.1 accepting 200,000), today every serious provider has a 100,000+ token model, and Google&#x27;s Gemini series accepts up to 2 million.&quot;, &quot;type&quot;: &quot;text&quot; }, { &quot;text&quot;: &quot;\n\n3. Price Crashes:\n&quot;, &quot;type&quot;: &quot;text&quot; }, </code></pre> I got Claude to build me a little debugging tool to help render that format: <a href="https:&#x2F;&#x2F;tools.simonwillison.net&#x2F;render-claude-citations" rel="nofollow">https:&#x2F;&#x2F;tools.simonwillison.net&#x2F;render-claude-citations</a>
评论 #42810054 未加载
jedberg4 months ago
&gt; Claude can now provide detailed references to the exact sentences and passages it uses to generate responses, leading to more verifiable, trustworthy outputs.<p>For now. Until it starts providing citations for AI generated content.
评论 #42809617 未加载
WiSaGaN4 months ago
This is actually good. I expect them to utilize this in code editing as well if there is some real efficiency gain under the hood.
7ero4 months ago
did it tell us that free will exists?
Destiner4 months ago
This is great for RAG, but Claude is generally hard to use for many cases due to lack of the built-in structured outputs.<p>You can try forcing it to output JSON, but that is not 100% reliable.
评论 #42808821 未加载