You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+186Lines changed: 186 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -972,6 +972,192 @@ foreach (var content in response.Value.Content)
972
972
}
973
973
```
974
974
975
+
### Citations
976
+
977
+
Anthropic provides a feature called [Citations](https://docs.anthropic.com/en/docs/build-with-claude/citations) that allows Claude to provide citations for information extracted from documents. This feature enables Claude to reference specific parts of the source material when answering questions, making it easier to verify information and understand the context of responses.
978
+
979
+
Citations can be enabled for documents and will return references to the specific locations in the source material where information was found. This library provides comprehensive support for citations through strongly-typed models that represent different types of citation locations.
980
+
981
+
#### Enabling Citations for Documents
982
+
983
+
You can enable citations for documents by setting the `Citations` property on `DocumentContent` instances:
984
+
985
+
```csharp
986
+
usingAnthropicClient;
987
+
usingAnthropicClient.Models;
988
+
989
+
varrequest=newMessageRequest(
990
+
model: AnthropicModels.Claude35Sonnet,
991
+
messages: [
992
+
new(MessageRole.User, [
993
+
newDocumentContent(newTextSource("The grass is green. The sky is blue."))
994
+
{
995
+
Title="My Document",
996
+
Context="This is a trustworthy document.",
997
+
Citations=new() { Enabled=true }
998
+
},
999
+
newTextContent("What color is the grass and sky?")
Anthropic provides a feature called [Message Batches](https://docs.anthropic.com/en/docs/build-with-claude/message-batches) that allows you to send multiple messages in a single request. This feature is covered in depth in [Anthropic's API Documentation](https://docs.anthropic.com/en/docs/build-with-claude/message-batches).
0 commit comments