Actions24
- Agent Actions
- Chat Actions
- File Actions
- Image Actions
- Model Actions
- Prompt Actions
- RAG Actions
- TTS Actions
- User Actions
- Video Actions
RAG → Prompt Completion
AI-generatedOverview
This node operation sends a prompt to a specified RAG (Retrieval-Augmented Generation) resource to generate a completion based on the prompt and various search parameters. It is useful for scenarios where you want to leverage a RAG model to generate responses or completions informed by retrieved data chunks. For example, you can use it to query a knowledge base or document repository with a natural language prompt and get a contextually relevant generated response.
Use Case Examples
- Sending a customer support query prompt to a RAG model to get a detailed answer based on company documentation.
- Using a RAG model to complete a text prompt with information retrieved from a large dataset or knowledge base.
Properties
| Name | Meaning |
|---|---|
| RAG ID | The unique identifier of the RAG resource to which the prompt will be sent. |
| Prompt | The text prompt to send to the RAG model for completion. |
| Model | The model identifier to use for generating the completion. |
| Search Type | The type of search algorithm to use for retrieving relevant data chunks (e.g., similarity, mmr, similarity_score_threshold). |
| K | The number of top results to consider in the search. |
| Fetch_k | The number of results to fetch initially before filtering. |
| Lambda_mult | A multiplier parameter used in the search algorithm to balance relevance and diversity. |
| Score_threshold | The threshold score to filter search results. |
Output
JSON
id- The unique identifier of the prompt completion response.message- The generated completion message from the RAG model.model- The model used to generate the completion.usage- Usage statistics or metadata related to the completion.created_at- Timestamp when the completion was created.
Dependencies
- An API key credential for Straico API authentication
Troubleshooting
- Ensure the RAG ID provided is valid and exists in the Straico system to avoid 404 errors.
- Verify that the model specified is supported and correctly spelled to prevent model-related errors.
- Check that all required parameters (RAG ID, prompt, model) are provided to avoid validation errors.
- If the response is empty or unexpected, verify the search parameters (search type, k, fetch_k, lambda_mult, score_threshold) for correctness and adjust as needed.
- Network or authentication errors may occur if the Straico API key credential is missing or invalid; ensure proper credential configuration.
Links
- Straico API RAG Prompt Completion - Official Straico API documentation for the RAG prompt completion endpoint.