Using Custom Commands in Prompts
Custom commands allow you to teach Tabnine to perform specific tasks repeatedly using a short alias. Once defined, you can reference the command in natural language prompts to streamline your workflows.
Custom commands are essentially macros for your agent: Once defined, they let you trigger a complex, project-specific behavior with a short alias.
Examples of usage:
"Run the
@summarize_diffcommand on the last commit""Use
@gen_testto create unit tests for this function"
Best Practices:
Combine custom commands with descriptive naming: use aliases like
@clean_jsdocinstead of@cmd1Reference them naturally. Treat the alias as a capability the model understands.
Use them as part of longer prompts: e.g., "Use
@gen_test, but make sure you mock the database layer."
When not to use: Avoid custom commands if your workflow or expectations change often. They work best for stable, repeatable patterns.
Common Prompting Pitfalls
Using Imprecise Language
Phrases like "clean this up," "make it better," or "optimize" are vague. The model will guess your intent, often leading to results that don’t meet your expectations. Developments in LLMs over time might demonstrate these kinds of prompts get better at approximating what you want, but just like with a person, be direct.
A better approach is to be explicit about certain things in the response.
For example, even if you don’t need to use a map() function in a JavaScript result, but you know it would be effective, prompt the model to use this method just to make sure it’s achieving usable results. Further iterations can swap out a map() option for something else, like forEach().
LLMs interpret specific goals more reliably than broad, fuzzy ones. Be explicit about structure, language features, or formatting rules.
Debugging Failed Prompts
Not every prompt gets the right result on the first try. Here’s how to debug, revise, and improve them.
1. Rewriting Strategies
Be more specific: Clarify file names, methods, formats.
Simplify: Break the task into multiple, smaller prompts.
Reframe: Instead of "Fix this code," say, "What does this function do and what edge cases does it miss?"
Shift focus: Ask for intermediate steps or analysis instead of full solutions.
2. What to Try Next
Restart the conversation to clear conflicting context.
Rerun the prompt with an example input/output.
Ask the model to "walk through the reasoning" if its answers seem wrong.
Try asking: "What assumptions are you making based on this prompt?"
Last updated
Was this helpful?
