Skip to main content
Tabnine is a code assistant you can run as an extension inside Visual Studio Code. Like other dev-focused assistants (for example BlackboxAI or GitHub Copilot), Tabnine brings model-powered code generation, in-editor suggestions, chat-style interactions, and project scaffolding right into the IDE where most developers already work. This guide walks through the main Tabnine workflows inside VS Code:
  • selecting a model and privacy options,
  • using the chat/assistant pane,
  • scaffolding a minimal Python project,
  • editing and accepting suggestions,
  • generating tests and documentation,
  • using the Ask/suggestions features.
A dark-themed code editor window (likely VS Code) with a modal popup titled "Selected model - GPT-4o" asking to approve legal terms and offering Back and Confirm buttons. The rest of the editor shows a large logo and keyboard shortcut hints on the right.

Model selection and privacy

Tabnine supports several model choices (for example Claude 3.5 Sonnet, GPT-4o, third-party models from Hugging Face, and Tabnine’s Protected/Private models). Choosing the right model affects cost, latency, behavior, and — crucially — data privacy and regulatory compliance.
When you must keep code and model execution inside your network (so the model neither sees nor trains on your code outside your environment), choose a Tabnine Protected/Private model (available for enterprise customers). This isolates model execution inside your infrastructure and prevents it from being trained on your codebase.
After you pick a model, Tabnine appears as a chat-style assistant in the sidebar. This chat integrates workspace context so the assistant can reference open files and project structure when answering prompts, suggesting edits, or scaffolding projects.
A dark-themed code editor window (Visual Studio Code) with the Tabnine Chat sidebar open on the left showing a welcome panel, action buttons, and a chat input at the bottom. The main area shows a large faint VS Code logo and a list of keyboard shortcuts.

Workspace chat and assistant UI

The Tabnine sidebar provides:
  • a chat input for conversational prompts,
  • action buttons for common workflows (scaffold project, generate tests, explain code),
  • suggestion badges inline in the editor for completions and edits.
Because the assistant keeps workspace context, new chats often still have access to your files and will base suggestions on the current project code.

Scaffolding a minimal Python project

Using the prompt term “scaffold” or “create project” usually prompts Tabnine to produce a full project layout and relevant best-practice files (venv setup, README, .gitignore, LICENSE, tests, and a simple main module). A concise set of commands to initialize a minimal project and virtual environment:
Common scaffolded project layout Tabnine suggests:
Example content for src/main.py:
Basic README.md:
Add the virtual environment to .gitignore to avoid committing it:
Run the script from the project root:

Notes about determinism

LLM-based assistants are non-deterministic: outputs vary with prompt phrasing, model choice, and workspace context. If you run the same prompt repeatedly you may get variations in file layout, naming, or comments, but the general structure and intent (a boilerplate project with a main function and supporting files) tend to be consistent.

Editing, commenting, and accepting Tabnine suggestions

Tabnine leverages workspace context to propose edits: adding comments, docstrings, small refactors, and inline code changes. Typically the assistant offers “Insert” (place the suggestion into the file) or “Apply” (merge edits) actions. Example: asking Tabnine to “Add comments to this code” might produce:
Accept or reject these suggestions via the UI or keyboard shortcuts. Always review automated edits before committing.
Automated suggestions (including refactors and scaffolding) should be reviewed before merging into your codebase. Models can introduce subtle bugs, licensing issues in suggested snippets, or patterns that don’t match your code conventions.

Testing: generate a test plan and test file

Tabnine can create test files and simple test plans. For the main() function above, an example pytest file Tabnine might generate:
Note: adjust import paths if your project uses a different package structure.

Explain: quick code explanations

You can highlight a code block and ask Tabnine to explain it. For the main() example the assistant commonly explains:
  • def main(): — defines the main function.
  • if __name__ == "__main__": — makes the module executable as a script while allowing safe imports without side effects.
These short, targeted explanations are useful for onboarding new contributors or creating inline documentation.

Document: generate docstrings or pydoc-style docs

Tabnine can auto-generate docstrings. Example docstring for main():
Accept these edits via the assistant UI when they match your style guide.

Ask: suggestions for improvements and best practices

The Ask feature provides higher-level suggestions such as:
  • parameterizing functions,
  • adding logging,
  • adding type hints,
  • refactoring to be more testable.
Example: parameterize the greeting and add basic logging:
Why choose logging over print?
  • Logging supports configurable levels and handlers.
  • It integrates with monitoring and can be redirected to files or external systems without changing the code flow.
  • print is fine for quick scripts; logging is preferred in production contexts.

Summary

  • Tabnine integrates into VS Code as a chat/editor assistant and supports multiple model types, including private/isolated models for enterprise use.
  • Use prompts like “scaffold” to get a project structure (venv, src, tests, README, .gitignore, LICENSE).
  • Tabnine can add comments, docstrings, generate tests, explain code, and suggest improvements (logging, parameterization, typing).
  • Always review suggested edits: model outputs are helpful but not guaranteed correct. Consider privacy constraints and choose Protected/Private models when handling proprietary or regulated data.
Additional lessons in this series cover other AI-assisted development tools and deeper workflows for secure, production-grade adoption.

Watch Video