-
Notifications
You must be signed in to change notification settings - Fork 10k
Anni/autorag changelog 2 #23036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Anni/autorag changelog 2 #23036
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d76ebdd
changelog + docs updated
aninibread 6b39fc7
test
aninibread f470b33
add metadata description
aninibread 01b857a
update the release note message
aninibread b857d69
fix links
aninibread 6d29032
metadata filtering link fixed
aninibread eec6383
metadata filtering link removal
aninibread 9856264
Update src/content/docs/autorag/how-to/multitenancy.mdx
aninibread ad1a315
Update src/content/docs/autorag/how-to/multitenancy.mdx
aninibread c24b34a
Update src/content/docs/autorag/configuration/metadata.mdx
aninibread 0c156cc
Update src/content/changelog/autorag/2025-06-16-autorag-custom-metada…
aninibread 44a36ac
Update src/content/changelog/autorag/2025-06-16-autorag-custom-metada…
aninibread e31843a
small fixes
aninibread 0543011
Update src/content/changelog/autorag/2025-06-16-autorag-custom-metada…
aninibread 03d3f50
update the dates
aninibread 7f5d2a5
Update src/content/docs/autorag/configuration/metadata.mdx
aninibread File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/content/changelog/autorag/2025-06-16-autorag-custom-metadata-and-context.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| title: View custom metadata in responses and guide AI-search with context in AutoRAG | ||
| description: You can now view custom metadata in AutoRAG search responses and use a context field to provide additional guidance to AI-generated answers. | ||
| products: | ||
| - autorag | ||
| date: 2025-06-16T6:10:00Z | ||
| --- | ||
|
|
||
| In [AutoRAG](/autorag/), you can now view your object's custom metadata in the response from [`/search`](/autorag/usage/workers-binding/) and [`/ai-search`](/autorag/usage/workers-binding/), and optionally add a `context` field in the custom metadata of an object to provide additional guidance for AI-generated answers. | ||
|
|
||
| You can add [custom metadata](/r2/api/workers/workers-api-reference/#r2putoptions) to an object when uploading it to your R2 bucket. | ||
|
|
||
| # Object's custom metadata in search responses | ||
|
|
||
| When you run a search, AutoRAG now returns any custom metadata associated with the object. This metadata appears in the response under `file`, inside `attributes`, and can be used for downstream processing. | ||
|
|
||
| For example, the `attributes` section of your search response may look like: | ||
|
|
||
| ```json | ||
| { | ||
| "attributes": { | ||
| "timestamp": 1750001460000, | ||
| "folder": "docs/", | ||
| "filename": "launch-checklist.md", | ||
| "file": { | ||
| "url": "https://wiki.company.com/docs/launch-checklist", | ||
| "context": "A checklist for internal launch readiness, including legal, engineering, and marketing steps." | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| # Add a `context` field to guide LLM answers | ||
|
|
||
| When you include a custom metadata field named `context`, AutoRAG attaches that value to each chunk of the file. When you run an `/ai-search` query, this `context` is passed to the LLM and can be used as additional input when generating an answer. | ||
|
|
||
| We recommend using the `context` field to describe supplemental information you want the LLM to consider, such as a summary of the document or a source URL. | ||
aninibread marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| For example: | ||
|
|
||
| ```json | ||
| context: "summary: 'Checklist for internal product launch readiness, including legal, engineering, and marketing steps.'; url: 'https://wiki.company.com/docs/launch-checklist'" | ||
aninibread marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
aninibread marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| This gives you more control over how your content is interpreted, without requiring you to modify the original contents of the file. | ||
|
|
||
| Learn more in AutoRAG's [metadata filtering documentation](/autorag/configuration/metadata). | ||
28 changes: 28 additions & 0 deletions
28
src/content/changelog/autorag/2025-06-16-autorag-filename-filter.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| title: Filter your AutoRAG search by file name | ||
| description: You can now filter AutoRAG search queries by file name, allowing you to control which files can be retrieved for a given query. | ||
| products: | ||
| - autorag | ||
| date: 2025-06-16T6:00:00Z | ||
| --- | ||
|
|
||
| In [AutoRAG](/autorag/), you can now [filter](/autorag/configuration/metadata/) by an object's file name using the `filename` attribute, giving you more control over which files are searched for a given query. | ||
|
|
||
| This is useful when your application has already determined which files should be searched. For example, you might query a PostgreSQL database to get a list of files a user has access to based on their permissions, and then use that list to limit what AutoRAG retrieves. | ||
|
|
||
| For example, your search query may look like: | ||
|
|
||
| ```json | ||
aninibread marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| const response = await env.AI.autorag("my-autorag").search({ | ||
aninibread marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| query: "what is the project deadline?", | ||
| filters: { | ||
| type: "eq", | ||
| key: "filename", | ||
| value: "project-alpha-roadmap.md", | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| This allows you to connect your application logic with AutoRAG's retrieval process, making it easy to control what gets searched without needing to reindex or modify your data. | ||
|
|
||
| Learn more in AutoRAG's [metadata filtering documentation](/autorag/configuration/metadata/). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| pcx_content_type: navigation | ||
| title: REST API | ||
| external_link: /api/resources/autorag/ | ||
| sidebar: | ||
| order: 9 | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.