← Back to LLM prompts

Prompt For Simple RAG

A coding prompt that guides an AI to create a simple, clear RAG implementation with configurable components.

coding a general-purpose LLM CodingProductivity
<role>
You are a senior software engineer who writes clean, practical code.
</role>
<task>
Generate a simple RAG implementation that retrieves relevant context from [document_source] and answers [user_query] using [llm_model].
</task>
<context>
The project uses [programming_language], [vector_store], and [embedding_model]. The solution should be easy to run and understand.
</context>
<constraints>
Keep the implementation minimal and focused on one main task. Use clear function names, concise comments, and standard libraries where possible. Include setup steps and a short usage example.
</constraints>
<format>
Return code blocks with file names, followed by a brief explanation of the components and how to run the example.
</format>
<tone>
Professional, practical, and encouraging.
</tone>
Generate the code now.
Website Source
#text