What Is an AI Coding Assistant
An AI coding assistant is a helper inside your code editor. You tell it what you want in plain words. It writes or fixes the code. You check it and run it.
In short: it is an AI that lives in your editor, turns your words into code, and speeds up your work — but you stay in charge of reviewing and testing.
Why it matters
Writing code by hand is slow. An assistant does the boring parts fast: boilerplate, small functions, tests, fixing errors. You spend more time on the real problem. It is also a great teacher — it can explain code in simple words.
What the words mean
- AI coding assistant: a tool in your editor that writes code from your request.
- LLM (large language model): the "brain" that was trained on lots of code and text.
- Prompt: the request you type (a sentence, or a code comment).
- Context: the files and text the assistant can see when it answers.
- Suggestion: the code it offers; you accept or reject it.
How it works, top to bottom
The three modes
Almost every assistant works in three modes. You will switch between them all day.
- Inline (autocomplete): as you type, it shows faint "ghost" code. Press Tab to accept. Best for finishing a line or a small function.
- Chat: a side panel where you ask questions like "write a function that reads a CSV" or "why is this error happening?". Best for bigger blocks and learning.
- Agent: you give a goal; it edits several files and can run commands — asking your approval. Best for multi-step tasks. More power means more care.
Chat vs Inline vs Agent
How to prompt for code (simple rules)
- Say the goal + the inputs + the output. "Write a Python function that takes a list of numbers and returns the average."
- Name the language and tools. "Use pandas." "No external libraries."
- Give an example of input and expected output when you can.
- Ask for small pieces, then build up. Short requests give better code.
Always review and test AI code
- Read it line by line. If you do not understand a line, ask the assistant to explain it.
- Run it on a small example and check the result.
- Write a test (you can ask the AI for one) and run it.
- Watch for made-up things — AI can invent function names or libraries that do not exist. Check the docs.
Safety basics
- Never paste secrets (passwords, API keys, real customer data) into a cloud assistant.
- Check licences if it produces a large chunk that looks copied.
- For private data, use a local model (Ollama) so nothing leaves your machine — see Keep data at yourself.
Quick quiz
1. What are the three main modes?
Inline (autocomplete), chat, and agent.
2. What must you always do with AI code?
Read it, run it, and test it before trusting it.
3. What is a "prompt"?
The request you type — a sentence or a code comment.
4. What should you never paste into a cloud assistant?
Secrets: passwords, API keys, or real customer data.
Save tokens and money
Use inline mode for small stuff (it is cheap and fast). Save chat/agent for real problems. Ask for "only the code" to get shorter answers. See more AI Coding guides.