Prompting with Context and References
Explore how to improve AI-assisted app development by including relevant context and references in your prompts. Understand which types of supporting materials like files, screenshots, logs, and examples provide the model with concrete information to generate accurate, consistent, and context-aware code. Learn best practices for selecting and presenting context effectively to refine your coding workflow.
We'll cover the following...
Many prompts produce weak results for a simple reason. The model may understand the request at a high level, but it does not have enough context to respond precisely. In vibe coding, missing context often matters more than the exact wording of the prompt.
When we ask for a change to an existing app, explain an error, match a layout, or follow a project pattern, the model usually needs more than a sentence or two. It needs context. A screenshot can show the current design. A log can show the exact error. A file can show the current structure. An example can show the pattern we want it to follow.
This is why context and references matter so much. They reduce guessing. They anchor the prompt in something concrete. Once that idea is clear, we can look more closely at what context means in practice and how to use it well.
What is context?
In vibe coding, context is the extra material we provide around a prompt so the model can respond with better awareness. That material can include files, folders, screenshots, terminal output, logs, or short examples. A reference is the specific item we point the model to when we want it to use that material for guidance.
Many coding tasks depend on existing information. If we ask for a change to a form, the current form matters. If we ask for a bug fix, the actual error matters. If we ask for a page that matches the rest of the product, the existing design matters. Without that supporting material, the model fills in the gaps on its own.
Some tools let us attach files directly. Some let us point to files or folders with a path. Some accept screenshots or terminal output. Some also support project instruction files that stay available across prompts. The surface changes from tool to tool, though the idea stays the same. Better context usually leads to more grounded output.
That broader definition helps because context can sound abstract at first. The next section turns it into specific ...