Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ Example uses of such compositions of AI models can be employed to generation vis

1. **Client upload**: Send POST request with content to API endpoint.
2. **Prompt generation**: Generate prompt for later-stage text-to-image model by calling [Workers AI](/workers-ai/) [text generation models](/workers-ai/models/) with content as input.
3. **Safety check**: Check for compliance with safety guidelines by calling [Workers AI](/workers-ai/) [text classification models](/workers-ai/models/#text-classification) with the previously generated prompt as input.
4. **Image generation**: Generate image by calling [Workers AI](/workers-ai/) [text-to-image models](/workers-ai/models/#text-to-image) previously generated prompt.
3. **Safety check**: Check for compliance with safety guidelines by calling [Workers AI](/workers-ai/) [text classification models](/workers-ai/models/) with the previously generated prompt as input.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page: http://localhost:1111/reference-architecture/diagrams/ai/ai-asset-creation/
has a broken internal link to: http://localhost:1111/workers-ai/models/.
The fragment text-classification does not exist.

By looking at the page: http://localhost:1111/workers-ai/models/
There was no ideal replacement found and so we removed the header link.

4. **Image generation**: Generate image by calling [Workers AI](/workers-ai/) [text-to-image models](/workers-ai/models/) previously generated prompt.

## Related resources

- [Community project: content-based asset creation demo](https://auto-asset.pages.dev/)
- [Workers AI: Text generation models](/workers-ai/models/)
- [Workers AI: Text-to-image models](/workers-ai/models/#text-to-image)
- [Workers AI: Text-to-image models](/workers-ai/models/)
- [Workers AI: llamaguard-7b-awq](/workers-ai/models/llamaguard-7b-awq/)
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In the context of Retrieval-Augmented Generation (RAG), knowledge seeding involv
1. **Client upload**: Send POST request with documents to API endpoint.
2. **Input processing**: Process incoming request using [Workers](/workers/) and send messages to [Queues](/queues/) to add processing backlog.
3. **Batch processing**: Use [Queues](/queues/) to trigger a [consumer](/queues/reference/how-queues-works/#consumers) that process input documents in batches to prevent downstream overload.
4. **Embedding generation**: Generate embedding vectors by calling [Workers AI](/workers-ai/) [text embedding models](/workers-ai/models/#text-embeddings) for the documents.
4. **Embedding generation**: Generate embedding vectors by calling [Workers AI](/workers-ai/) [text embedding models](/workers-ai/models/) for the documents.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page: http://localhost:1111/reference-architecture/diagrams/ai/ai-rag/
has a broken internal link to: http://localhost:1111/workers-ai/models/.
The fragment text-embeddings does not exist.

By looking at the page: http://localhost:1111/workers-ai/models/
There was no ideal replacement found and so we removed the header link.

5. **Vector storage**: Insert the embedding vectors to [Vectorize](/vectorize/).
6. **Document storage**: Insert documents to [D1](/d1/) for persistent storage.
7. **Ack/Retry mechanism**: Signal success/error by using the [Queues Runtime API](/queues/configuration/javascript-apis/#message) in the consumer for each document. [Queues](/queues/) will schedule retries, if needed.
Expand All @@ -42,13 +42,13 @@ In the context of Retrieval-Augmented Generation (RAG), knowledge seeding involv
![Figure 2: Knowledge queries](~/assets/images/reference-architecture/rag-ref-architecture-diagrams/rag-architecture-query.svg "Figure 2: Knowledge queries")

1. **Client query**: Send GET request with query to API endpoint.
2. **Embedding generation**: Generate embedding vectors by calling [Workers AI](/workers-ai/) [text embedding models](/workers-ai/models/#text-embeddings) for the incoming query.
2. **Embedding generation**: Generate embedding vectors by calling [Workers AI](/workers-ai/) [text embedding models](/workers-ai/models/) for the incoming query.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page: http://localhost:1111/reference-architecture/diagrams/ai/ai-rag/
has a broken internal link to: http://localhost:1111/workers-ai/models/.
The fragment text-embeddings does not exist.

By looking at the page: http://localhost:1111/workers-ai/models/
There was no ideal replacement found and so we removed the header link.

3. **Vector search**: Query [Vectorize](/vectorize/) using the vector representation of the query to retrieve related vectors.
4. **Document lookup**: Retrieve related documents from [D1](/d1/) based on search results from [Vectorize](/vectorize/).
5. **Text generation**: Pass both the original query and the retrieved documents as context to [Workers AI](/workers-ai/) [text generation models](/workers-ai/models/#text-generation) to generate a response.

## Related resources

- [Tutorial: Build a RAG AI](/workers-ai/tutorials/build-a-retrieval-augmented-generation-ai/)
- [Workers AI: Text embedding models](/workers-ai/models/#text-embeddings)
- [Workers AI: Text embedding models](/workers-ai/models/)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page: http://localhost:1111/reference-architecture/diagrams/ai/ai-rag/
has a broken internal link to: http://localhost:1111/workers-ai/models/.
The fragment text-embeddings does not exist.

By looking at the page: http://localhost:1111/workers-ai/models/
There was no ideal replacement found and so we removed the header link.

- [Workers AI: Text generation models](/workers-ai/models/#text-generation)