# Day 6 - Jan 28 2026

### 1. The Hierarchy of Prompts

Most people only use the "User Prompt." To build apps, we need the full stack.

* System Prompt: The "God Mode" instruction. It sets the AI's persona, constraints, and format (e.g., "You are a JSON machine. Never explain.").
* User Prompt: The actual task or query (e.g., "Summarize this email.").

### 2. Zero-Shot vs. Few-Shot

* Zero-Shot: Asking the AI to do something without examples.
  * *Input:* "Translate this to Spanish: Hello."
  * *Risk:* The AI might say "Sure! The translation is 'Hola'." (We don't want the conversational filler).
* Few-Shot: Giving the AI examples of what you want *before* asking the question. This is the secret weapon for reliability.
  * *Input:*
    * "English: One -> Spanish: Uno"
    * "English: Two -> Spanish: Dos"
    * "English: Hello -> Spanish: ?"
  * *Result:* "Hola" (Clean, predictable output).

### 3. The "Chain of Thought" Trick

For complex logic (math or reasoning), telling the AI to "Think step-by-step" improves accuracy by \~50%.

* *Why?* It forces the model to generate reasoning tokens before the final answer, effectively giving it "time to think."

### Status:

* [x] Tested System vs. User Prompts
* [x] Implemented Few-Shot Examples for JSON extraction
* [x] Verified cleaner outputs with structured prompting


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shankar-lab.gitbook.io/mylearning/15-days-genai-learning-challenge/day-6-jan-28-2026.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
