Claude API Code Grading
Last updated 2026-09-28What's new
- Claude Code (a coding assistant that runs in your computer's terminal) and Computer Use (tools that let Claude interact with desktop applications) are two new applications built using the Claude API (a way for software to talk to Claude, an AI assistant).
- These applications help you understand how to use the Claude API by showing you how to name inputs, see where the application works, and check the results.
- The goal is to create a smaller, testable boundary between Claude and your application, making it easier to inspect and reuse.
- This module is also a good practice for the Claude Certified Architect exam, which tests your knowledge of using Claude's tools.
- The new lesson focuses on using the Claude API (a tool that lets you interact with an AI assistant) to add citations (references to sources) to answers, making them more transparent and trustworthy.
- You'll learn to modify document messages to enable citations, creating a clear, inspectable process that connects user questions to specific sources.
- Citations work with various document types, not just PDFs, and can be integrated into user interfaces to make source information easily accessible.
- This feature is particularly useful when users need to verify information or explore broader contexts, enhancing the AI's reliability and user trust.
- Retrieval Augmented Generation (RAG) (a technique to handle large documents by breaking them into chunks) helps Claude (an AI tool) focus on relevant content, making it cost-effective and faster.
- RAG requires pre-processing (preparing data before using it) to chunk documents and a search mechanism to find relevant chunks, but chunks might not always contain all the needed context.
- RAG involves more technical decisions and work than simply including everything in a prompt, so it's important to understand when to use it.
- The lesson focuses on turning these concepts into practical behaviors using the Claude API (a tool that lets you interact with Claude), helping you build a repeatable mental model for future implementations.
- Claude (an AI assistant) can now use tools to get real-time info, like weather, by asking your app (software) for help, keeping data access safe and controlled.
- This tool use happens in a four-step loop: user asks Claude, Claude asks your app, your app gets data, and Claude gives the final answer.
- For example, to set a reminder, Claude needs tools for current time, date math, and reminder setting, showing how tools can handle complex tasks step by step.
- Rockbot (an email management system) works 24/7, even when your computer is off, unlike Claude Co-work (a previous email tool that only runs when your computer is on).
- Rockbot uses its own server to manage your emails, keeping your sensitive information safe on your desktop.
- To set up Rockbot, you need to download the app (around $20/month) and use a chat assistant like Claude (an AI tool you chat with) or Chat GBT (another AI chat tool) to create and train your email management bot.
- Rockbot can connect to your Gmail (email service), Google Calendar (scheduling tool), and other apps to organize and manage your emails based on your preferences.
- Claude Code (a coding assistant tool) now offers a free model with 1.5 billion tokens monthly, a significant cost-saving for users previously paying for credits.
- Omni Route (a laptop app) aggregates free API keys from multiple providers, automatically switching between them to maximize free usage, avoiding the hassle of manual configuration.
- This setup allows users to keep the Claude Code interface while changing the underlying AI model (the "brain") to a free one, making it versatile for other tools like Deep Sea Carnage (another AI coding tool).
- Claude (an AI tool for creating websites and graphics) can now use a new system to create consistent, high-quality designs across different formats like websites, posters, and emails.
- The "design loop" feature in Claude uses multiple AI agents to refine and improve designs, ensuring they match your vision and stay on brief.
- Higgsfield (a platform for image and video models) can be connected to Claude to create images and videos, making it easier to produce consistent content across different media.
- For AI tasks, bigger models aren't always better; medium settings like Claude Fable 5 Medium or Opus 5 Medium often give the best balance of cost and performance for most tasks.
- When using AI tools like Claude Code, start by setting a clear goal and asking it to question you to fill in any gaps, rather than trying to provide every detail upfront.
- AI tools have a "context window" (the amount of conversation it can remember at once), which affects both cost and performance, so it's important to manage this by starting new chats when it gets too full.
- Tokens are like words in a conversation with AI; the more tokens used, the more it costs and the worse the AI performs, so it's important to keep track of this.
- The **Claude Code desktop app** (a user-friendly software for AI tasks) is now recommended for beginners, offering features like voice mode and browser automations, making it more accessible than the terminal (a technical tool for coding).
- Beginners should start with the "local" setting in Claude Code, which runs tasks directly on their computer, and ignore advanced options like "cloud" or "remote control" for now.
- In settings, beginners should leave "instructions for Claude" blank unless they have a specific need, and turn on most capabilities, except for advanced features like "pull requests" (a coding term for proposing changes to a project).
- For permissions, the "auto" mode is suggested, which allows Claude Code to perform tasks automatically but stops potentially dangerous actions, balancing convenience and safety.
- **Claude Code (Anthropic's AI coding assistant)** helps teams edit code, run commands, and follow project rules, making it easier to work together safely and efficiently.
- **Agent SDK (a toolkit for custom agents)** and **Claude API (a tool for custom apps)** let teams build their own automation and apps, choosing the right tool for the job.
- **Shared settings, hooks (automatic checks), and permissions** help teams work faster and safer, like giving a new hire a handbook, clear rules, and the right tools for the job.
- **Project memory (like a team handbook in Claude.md)** keeps everyone on the same page, while **skills and sub-agents (specialist tools)** help with specific tasks, making teamwork smoother.
- A new way to make money with AI is becoming popular: becoming an AI consultant (someone who helps businesses use AI to solve problems and save time/money).
- Instead of starting an AI agency (a business that sells AI services to clients), many people are now getting hired by companies to use AI tools like Claude (a type of AI) to improve their specific business.
- Companies are struggling to use AI effectively, even though they're spending a lot of money on it, creating a big opportunity for skilled AI consultants.
- There are two main ways to become an AI consultant: freelancing (working for yourself and finding your own clients) or getting hired by a company to use AI full-time.
- Using XML tags (simple markers like `<sales_records>`) in your requests to Claude API (a tool for building applications with AI models) helps organize content, making it easier for the AI to understand and process.
- Providing examples in your prompts, especially when tasks are complex or ambiguous, helps Claude learn the pattern you want it to follow, improving the quality of its responses.
- For tasks with varied inputs or complex outputs, use multi-shot prompting (providing multiple examples) to cover different scenarios, but keep the number of examples practical to avoid wasting space.
- To create effective examples, use clear structure like `sample_input` and `ideal_output`, and explain why the example is a good one to help Claude understand the underlying reasoning.
- Claude (an AI assistant) can automate boring tasks, like sorting emails into categories (leads, urgent, etc.) and drafting responses, saving you 5-10 hours weekly.
- For leads, Claude can research companies, draft replies, and even schedule meetings using your calendar, streamlining your sales process.
- After client calls, Claude can generate branded PDF proposals with scope, pricing, and signatures, saving time on manual proposal creation.
- This setup can be adapted to various jobs, especially those involving sales, marketing, or regular research tasks.
- Cloud Code (a tool for AI users) isn't just for developers; it helps non-technical users get reliable AI results by working with files and folders on your computer.
- Use Cloud Code (not regular Claude, a chat-based AI) when you need to create, reuse, or improve files, like sales pages or customer research, that stick around in your business.
- To start using Cloud Code, download the free app VS Code (from Microsoft), add the Cloud Code extension, and give it access to a folder on your computer to use as your workspace.
- Once set up, you can tell Cloud Code to create new folders and files, and watch it make live changes in those files as it works.
- Claude (an AI tool by Anthropic) is helping non-coders build real businesses, like Vulcan, which won a Virginia state contract for government software.
- Claude Code (a feature of Claude) builds full apps, websites, or automates tasks in minutes, just by describing what you want in plain English.
- Claude is "agentic" (it takes action on its own), works in parallel (multiple tasks at once), and remembers things, making it a powerful tool for businesses and jobs.
- Over half of the startups in Y Combinator's (a famous startup accelerator) newest batch are building with Claude, showing its growing popularity and effectiveness.
- The "taste" skill (open-source GitHub project) helps improve AI-generated front-end design, making websites look better with features like image-to-code and redesign tools.
- "Impeccable" (open-source front-end design skill) is now built into GitHub Copilot (a tool that helps write code), offering 23 commands to refine and critique designs, with a live browser editor for visual adjustments.
- "Awesome design.md" (based on Google Stitch's design.md principle) uses existing websites as templates, breaking down their design elements to help you create your own unique site with a similar look and feel.
- "Ponytail" (fast-growing AI repo) aims to make Claude Code (AI tool for coding) more efficient, reducing the amount of code it writes while maintaining the same output, making it faster and cheaper to use.
- Claude (an AI assistant) has three main modes: Chat (quick answers), Co-work (file access), and Code (full access, best for building things).
- Opus 4.8 is Claude's most capable model, Sonnet 4.6 for daily tasks, and 4.5 for fast, simple work.
- Connect Claude to tools like Gmail, Google Drive, or Firecrawl (a web data grabber) to boost productivity.
- Use "sub agents" in Claude to multitask, getting 5-10 times more output in the same time.
- A new open-source AI model called GLM 5.2 (a free, community-developed AI tool) was released, outperforming leading models like GPT and Gemini in various tests.
- To maximize its potential, use GLM 5.2 with frameworks like OpenClaw (a tool that helps AI work on complex tasks) or Zcode (a free, user-friendly AI assistant for Mac, Windows, and Linux).
- GLM 5.2 can create advanced projects, like a 3D interactive Earth model, with some additional guidance, showcasing its impressive capabilities for open-source AI.
- The model can also handle complex, multi-tool tasks, such as creating a promotional video with voiceovers and animations, demonstrating its versatility for everyday workflows.
Key points
What it is
- Claude API Code Grading is a system that uses a separate AI (called a "grader") to evaluate code created by another AI (Claude), instead of letting Claude judge its own work.
- This matters because AI-generated code often has errors, and developers using AI may not notice them, thinking their work is better than it is.
- The grader checks if the code follows the task, is complete, helpful, and safe, but might miss small format mistakes unless checked directly.
- It gives feedback like a score (1-10) or a label (true/false) that you can use to decide if the code is good enough or needs improvement.
How to use it
- First, send your task to Claude via the API and capture the response. Then, pass that response to the grader, which is a second API request that evaluates the output against your criteria.
- Use the grader's feedback to decide next steps: if the score is low, you might retry the task or have a human review it.
- Treat code grading as a loop: run your task, evaluate with a grader, and act on the feedback.
- Split grading into two parts: use the model grader for qualitative judgment (helpfulness, safety, task following) and implement hard gates (strict checks) for exact format and code structure.
Watch out for
- Model graders use flexible judgment and might miss exact format mistakes or structural errors in code if you rely solely on them.
- AI models like Claude cannot reliably evaluate their own code, so it's important to use a separate grader or even a second tool for review.
- If you're not an expert software engineer, you might not be able to verify if the generated plan is the best path.
Tools named
- Claude (an AI model that generates code), Codex (an AI model that reviews plans), n8n (a drag-and-drop tool for connecting apps)
Lesson 1: What is Claude API Code Grading and why it matters
Claude API Code Grading is a system that evaluates code output from Claude using a separate grader (a small evaluation program) instead of relying on Claude to judge its own work. This matters because developers using AI tools have been found to produce code that scored 17% lower on tests, and experienced developers using AI took 19% longer to finish tasks while believing they were 24% faster. That gap between perception and reality shows why blind trust in AI code is dangerous.
A model grader (an AI-based evaluator) provides flexible judgment on task following, completeness, helpfulness, and safety. However, exact format mistakes can slip through unless you check them directly. The grader receives output from your original Claude call and returns feedback you can actually use, typically a score from 1 to 10. This split between flexible judgment and hard rules matters for real applications because production systems need both.
Anthropic even warns that Claude Code cannot be trusted to evaluate its own code correctly. To address this, some tools bring in Codex (another AI model) to review plans in a read-only sandbox, creating an iterative conversation between two AI systems until both sign off. This approach gives you confidence that the plan actually makes sense.
For the Claude Certified Architect exam, you need to reason about behavior, state, and application boundaries. Code grading turns API controls into practical application behavior, making it prerequisite practice for production systems that require reliable quality gates.
Sources
- 2026-06-15 — Claude Certified Architect Prerequisite Building with the Claude API Part 7 Code-Based Grading
- 2026-02-02 — AI Coders Scored 17% Lower—Here's What They Did Wrong
- 2026-06-09 — Claude Certified Architect Prerequisite Building with the Claude API Part 6 Model Based Grading
- 2026-06-05 — Anthropic Just Warned Everyone About Claude (Its Evolving)
- 2026-06-05 — Its starting
- 2026-06-06 — The Top 10 Claude Code Plugins to 10x Your Next Project (June '26)
- 2026-06-05 — I Updated grill-me And Solved Claude Code
- 2026-03-04 — The perception vs reality gap that's hurting productivity #aireality #coding #tech
- 2026-04-09 — Claude Just Told Us to Stop Using Their Best Model
- 2026-05-24 — Claude Certified Architect Prerequisite Claude API Part 2 Conversations & System Prompts
- 2026-05-15 — Anthropic Just Dropped Their Claude Code Playbook (Here's What Changed)
- 2026-06-01 — Claude Certified Architect Prerequisite Building with the Claude API Part 4 Structured Data
- 2026-04-15 — Which AI coding level are you actually at
- 2026-05-15 — Hermes Agent just got 10X Better (Agentic OS)
Lesson 2: How to use Claude API Code Grading: step-by-step
How to Use Claude API Code Grading Step by Step with Examples
A grader (a small evaluation system) receives the output from your original Claude API call and returns feedback you can use—like a true/false label, a category, or a score from 1 to 10, where 10 means strong output and 1 means weak. This is recommended as prerequisite practice for the Claude Certified Architect exam because production systems need both flexible judgment and hard checks.
To start, you must first complete the prerequisite groundwork in the "Building with the Claude API" module: choose the right model, protect your API secret key, send a structured request with the correct request fields (parameters like messages and system prompts), and inspect the response. A model grader (AI that evaluates other AI output) can assess task following, completeness, helpfulness, and safety, but it may miss exact format mistakes unless you check them directly.
Here is a step-by-step example. First, send your original task to Claude via the API request. Capture the response. Second, pass that response to a separate grader call—a second API request that instructs Claude to evaluate the output against your criteria, such as "Score the answer from 1 to 10 on completeness." Third, use the grader's returned score or label to decide next steps: if the score is below 7, you might retry the original task or flag it for human review.
This split between model-based judgment and hard format gates is key for real applications. The larger course map includes prompt engineering, tool use, and retrieval augmented generation, all building on this grading pattern. Treat code grading as a loop: run your task, evaluate with a grader, and act on the feedback.
Sources
- 2026-06-15 — Claude Certified Architect Prerequisite Building with the Claude API Part 7 Code-Based Grading
- 2026-06-09 — Claude Certified Architect Prerequisite Building with the Claude API Part 6 Model Based Grading
- 2026-06-01 — Claude Certified Architect Prerequisite Building with the Claude API Part 4 Structured Data
- 2026-05-21 — Claude Certified Architect Prerequisite Building with the Claude API Part 1 API Foundations
- 2026-05-24 — Claude Certified Architect Prerequisite Claude API Part 2 Conversations & System Prompts
- 2026-06-13 — DON'T Build Claude Agents. Build Skills.
- 2026-06-01 — Anthropic Just Told You How to Fix Claude Code (Most People Wont Listen)
- 2026-04-13 — Claude Code + Google Stitch (Build a Site in 30 Min)
- 2026-05-21 — Create Your Own Personal Claude AI System (That Makes Your Work EASY)
- 2026-02-09 — Ship Code 10x Faster Here's How Top Developers Use Claude Code
- 2026-03-05 — Turn Claude Code Into Your Executive Assistant in 27 Mins
- 2026-05-03 — Copy These Claude Skills, They'll Blow Up Your Business
- 2026-04-11 — Seedance 2.0 + Claude Code Creates $10k Websites in Minutes
Lesson 3: Best practices and pitfalls
Code grading with the Claude API has two main pitfalls. First, a model grader (AI evaluator) uses flexible judgment. It can explain task following and completeness, but exact format mistakes can slip through unless you check them directly. If you rely solely on a model grader, structural errors in code may pass. Second, an AI model cannot reliably evaluate its own code. As one source notes, "Claude Code cannot be trusted all the time to necessarily evaluate its own code correctly" — a problem Anthropic itself has raised. If you are not an expert software engineer, you cannot verify if the generated plan is the best path.
The best practice is to split grading into two parts. Use a model grader for qualitative judgment on helpfulness, safety, and task following. At the same time, implement hard gates (strict checks) for exact format and code structure. This split between judgment and deterministic checks matters for production systems and is prerequisite knowledge for the Claude Certified Architect exam. Another strong practice is adding a second set of eyes: bring in a separate tool like Codex to review plans in a read-only sandbox before finalizing. This prevents the single-perspective blind spot of self-evaluation.
To operationalize this, your grader should be a small evaluation system that receives output from the original Claude call and returns usable feedback — a true/false, a category, or a score (like 1 to 10). Always treat code grading as a two-stage workflow: one pass for qualitative soundness, another for hard structural rules.
Sources
- 2026-06-15 — Claude Certified Architect Prerequisite Building with the Claude API Part 7 Code-Based Grading
- 2026-06-09 — Claude Certified Architect Prerequisite Building with the Claude API Part 6 Model Based Grading
- 2026-06-01 — Claude Certified Architect Prerequisite Building with the Claude API Part 4 Structured Data
- 2026-05-24 — Claude Certified Architect Prerequisite Claude API Part 2 Conversations & System Prompts
- 2026-05-21 — Claude Certified Architect Prerequisite Building with the Claude API Part 1 API Foundations
- 2026-06-06 — The Top 10 Claude Code Plugins to 10x Your Next Project (June '26)
- 2026-05-21 — Create Your Own Personal Claude AI System (That Makes Your Work EASY)
- 2026-06-13 — DON'T Build Claude Agents. Build Skills.
- 2026-04-11 — Seedance 2.0 + Claude Code Creates $10k Websites in Minutes
- 2026-06-01 — 3 AMAZING Claude Code Dynamic Workflows (Opus 4.8)
- 2026-03-05 — Turn Claude Code Into Your Executive Assistant in 27 Mins