Comprehensive Guide to Vibe Coding Concepts

Explore the essential terms of AI programming and understand how concepts like LLMs and token usage can enhance your coding experience.

C Vibe Coding Concepts

This article aims to provide a clear and understandable overview of the core terms in AI programming based on public information and personal practice.

AI Basic Concepts

Artificial Intelligence (AI)

In simple terms, AI is about enabling computers to think like humans—understanding problems, learning independently, and finding solutions. In Vibe Coding, AI acts as your programming partner, ready to help you write code as soon as you clarify your requirements, much like having a programmer friend on standby.

Large Language Models (LLM)

Large Language Models (LLM) are a type of AI that excels at human-like communication, with ChatGPT and Claude being notable examples. They are termed “large” because they operate with billions or even trillions of parameters. The more data they process, the smarter they become, but this also requires more computational resources.

You can think of it as a super scholar that has read and practiced everything in the world of books and code. It can handle tasks like writing code, explaining code, and debugging because it has encountered and practiced a wide range of scenarios.

Model Parameters

The “parameters” of a model represent the knowledge it has learned, stored as a series of numbers. Generally, the more parameters a model has, the smarter it is. For example:

  • GPT-4 has approximately 1.8 trillion parameters.
  • Claude 3.5 Sonnet has an estimated several hundred billion parameters.
  • DeepSeek-V3 has 671 billion parameters.

However, more parameters also mean higher costs—not just in training but also in operational power and resources. Typically, more parameters equate to greater capability, but at a higher cost.

Training and Inference

Training and inference are the two phases of AI’s “learning” and “testing”.

Training: This is akin to AI “going to school”, where it processes vast amounts of data (like books, code, and web pages) to learn. This phase is time-consuming and resource-intensive, usually undertaken by large companies, so individuals need not worry about it.

Inference: After training, when you ask the AI a question, it uses its learned knowledge to respond—like chatting with ChatGPT or asking it to write code. In simple terms, training is when AI studies hard, while inference is when you utilize its capabilities.

Fine-tuning

Fine-tuning is like giving a graduated AI a specialized training course. While it has a general understanding, if you train it with specific medical data or your company’s code, it can become more specialized in that area. However, fine-tuning can be costly and labor-intensive, often unnecessary for most users who can simply use off-the-shelf AI.

Token and Billing

Token

Tokens are the “smallest counting units” that AI uses when processing text, similar to “word chunks”. In English, one word (like “hello”) counts as approximately one token, while in Chinese, a character typically counts as one to two tokens, making Chinese more token-intensive.

Why does this matter? AI usage is billed by tokens—your input plus the AI’s responses count towards the total. The more you use, the more you pay. For example:

  • “Hello World” ≈ 2 tokens
  • “你好世界” ≈ 4 to 6 tokens

So, don’t underestimate the cost of a few extra characters!

Input Tokens and Output Tokens

When using AI, billing is calculated separately:

  • Input tokens: The content you send to AI (like questions, code, files).
  • Output tokens: The answers AI provides (like explanations, generated code).

Typically, output is more expensive than input because generating responses requires more computational effort.

Cost-saving tip: Be concise and clear in your prompts. This way, AI understands your request in one go, saving both tokens and time!

Context Window

The context window refers to how much content AI can “see” and “remember” at once, measured in tokens. You can think of it as AI’s “temporary memory capacity”. Different models have varying capacities:

  • GPT-4 can remember about 100,000 Chinese characters.
  • Claude 3.5 Sonnet can remember around 150,000 characters.
  • Gemini 2.0 Pro can remember approximately 1.5 million characters—equivalent to a small book!

The advantage is that when dealing with large code files or lengthy conversation histories, models with larger windows can handle tasks more smoothly without “forgetting” previous context.

However, note that larger windows consume more tokens, increasing costs. So, don’t blindly pursue larger windows; sufficient capacity is often enough—much like eating; overindulging can lead to waste.

Prompting Techniques

Prompt

A prompt is how you communicate with AI—telling it what to do. The clearer you are, the better it performs. Avoid vague requests like “make a website”; instead, specify details:

“Create a blue-themed accounting website using React, with features to add expenses, view lists, and calculate totals.”

This clarity allows AI to work accurately without guessing.

AI interactions typically involve three roles:

  • System prompt (invisible to you): subtly instructs AI to be professional and concise.
  • User prompt: your requests or questions.
  • Assistant prompt: AI’s responses.

Understanding these roles is useful; for example, during debugging, you can simulate previous discussions by providing context to AI, enhancing its understanding.

In summary: Clear communication leads to effective AI performance.

System Prompt

A system prompt sets the “character” and “rules” for AI before it starts working. For instance, you might say:

“You are an experienced React developer; your responses should be professional and concise.”

This instruction influences AI’s responses throughout the conversation, ensuring it stays on topic and avoids unnecessary details. If you want AI to adopt a specific expertise or tone, you can configure it through system prompts in advance.

In simple terms: System prompts define AI’s role, style, and guidelines.

Prompt Engineering

Prompt engineering is the skill of effectively communicating with AI. Rather than asking a random question, you strategically organize your language so AI understands your needs and how to fulfill them. In Vibe Coding, this skill is particularly valuable—those who excel at writing prompts can generate high-quality code in just a few sentences, while those who struggle may need multiple attempts.

Thus, prompt engineering = directing AI intelligently, minimizing unnecessary words, and achieving precise results. It’s a practical skill that helps AI understand human language better.

Zero-shot Prompt

A zero-shot prompt involves giving AI a command without examples or demonstrations, relying solely on its prior knowledge to complete the task. For instance, saying, “Translate this English text into Chinese,” allows AI to utilize its learned information.

This method is suitable for simple, common tasks like translations or basic functions, as AI has encountered these frequently. However, for more obscure or complex tasks, providing examples (known as “few-shot prompts”) may be necessary for better accuracy.

In summary: Zero-shot = direct command, AI relies on prior knowledge. If it works, great; if not, additional guidance may be needed.

Few-shot Prompt

A few-shot prompt means providing AI with a few examples to follow. For instance, if you want AI to translate but are concerned about accuracy, you might give it a couple of examples:

  • English: Hello → Chinese: 你好
  • English: Thank you → Chinese: 谢谢

Then, when you provide a new sentence, it will mimic the format you provided, ensuring consistent results. This approach is particularly effective when:

  • You have specific formatting requirements (like logs, tables, or code comments).
  • The task is somewhat ambiguous, and examples clarify expectations.

In summary: Few-shot prompt = provide examples first, then let AI work, leading to quicker and more accurate results.

Chain-of-Thought Prompt

A chain-of-thought prompt encourages AI to think through a problem step by step rather than rushing to answer. By adding a phrase like, “Please think step by step,” AI will break down the problem, analyze the logic, and clarify the steps before providing an answer.

This technique is particularly useful for complex problems—like writing a program with multiple functions, debugging unusual issues, or tackling tricky logic problems. Allowing AI to “think aloud” often results in more reasonable and reliable code.

In summary: Adding “think slowly” transforms AI from a rapid responder into a thorough problem-solver, yielding more accurate and structured results.

Markdown Language

Markdown is a method for quickly formatting text using simple symbols, such as:

  • Using # for headings
  • Using bold for emphasis
  • Using - for lists

In Vibe Coding, Markdown is frequently used because:

  • AI defaults to Markdown format when responding (including headings, code blocks, lists, etc.).
  • Project documentation (like README files) is typically written in Markdown.
  • Some rules or configuration documents are also in Markdown.

Thus, knowing Markdown allows you to understand AI outputs and create clean, professional documents—you can format text quickly and efficiently without relying on mouse clicks.

AI Programming Models

Vibe Coding

Vibe Coding is a new approach proposed by computer expert Andrej Karpathy in early 2025: instead of writing code yourself, you simply describe in plain language what functionality you want and how you want the program to operate, and AI will generate runnable code for you.

In essence, the focus of programming shifts from memorizing syntax and writing details to clearly articulating your ideas—similar to ordering takeout—you don’t need to know how to cook, but you must know what you want to eat, leaving the rest to the kitchen (i.e., AI).

Agentic Coding

Agentic Coding allows AI to function as a capable assistant, not just responding to queries but also proactively planning, executing, checking, and correcting tasks. For example, in Cursor’s Agent mode, AI can analyze code, devise solutions, modify files, run tests, and automatically fix issues—completing complex tasks without step-by-step guidance. In short, it acts as a “doer” rather than just a “Q&A machine”.

Multi-Agent Collaboration

Multi-agent collaboration involves multiple AIs working on different aspects of a project, akin to a small team. For instance, if you want to build a website, one AI could handle the overall structure, another could work on the frontend, another on backend logic, and yet another could focus on identifying bugs and checking code vulnerabilities. They collaborate without needing you to manage each one individually.

This approach has gained popularity in recent years because even the smartest single AI can overlook details, while “teamwork” can tackle genuinely complex tasks—just as we wouldn’t expect one person to be both a designer, programmer, and tester.

AI Orchestration

Orchestration is essentially the role of the “foreman” for an AI team. You have several AI agents, each capable of performing tasks, but someone must coordinate who does what, when, how data is shared, and how results are integrated. The orchestrator manages this process: it doesn’t write code itself but organizes the workflow, ensuring each AI does the right job at the right time.

Like a conductor leading an orchestra, the orchestrator ensures that each instrument plays in harmony, preventing chaos. Without it, a group of AIs working independently may lead to mistakes.

Agent Loop

The Agent Loop is the “think-act-check” cycle of AI work. It doesn’t just provide a one-off answer; instead, it iteratively refines its approach, examining the current situation (like reading code or checking errors), determining the next steps, executing changes, and then reviewing whether the modifications were successful. If not, it repeats the process until the task is completed.

When using Cursor Agent, you’re essentially employing an AI programmer that learns through trial and error, adjusting as needed. Understanding this helps clarify why it sometimes appears to loop back multiple times—it’s not stuck; it’s diligently closing the feedback loop.

ReAct: Reasoning and Acting

ReAct (Reasoning and Acting) enables AI to learn to “think while doing”. Previously, AI either outputted answers without action or acted without thought. ReAct addresses this issue by prompting AI to first consider the situation—“What’s happening? What should I do?”; then it takes action; after that, it checks the results; if they’re incorrect, it adjusts its approach.

This process is akin to troubleshooting a computer: first assessing whether the network cable is loose (reasoning), then tightening it (acting), checking if the internet works (observing), and if not, reconsidering by checking the router (re-reasoning). AI using ReAct systematically completes complex tasks through this iterative logic.

Tool Invocation

Tool invocation is the crucial step that transforms AI from a “talker” to a “doer”. AI can generate text but cannot perform physical tasks. However, through tool invocation, it can “call for help” when needed—like reading files, executing commands, querying the web, or connecting to databases.

The process involves four steps, resembling directing an intern:

  1. Identifying the problem: AI realizes, “I can’t do this alone; I need to check something.”
  2. Choosing the right tool: It decides whether to read a file or call an API.
  3. Issuing instructions: Instead of doing it itself, it specifies, “Please use the XX tool with parameters A, B, C.”
  4. Processing results: Once the system retrieves the results, AI combines this information to continue working or responding.

Was this helpful?

Likes and saves are stored in your browser on this device only (local storage) and are not uploaded to our servers.

Comments

Discussion is powered by Giscus (GitHub Discussions). Add repo, repoID, category, and categoryID under [params.comments.giscus] in hugo.toml using the values from the Giscus setup tool.