title | description | keywords | metaTitle | metaDescription |
---|---|---|---|---|
Prompt Guide |
A semi-exhaustive list of what you can ask Greptile, and how to get it to do what you want. |
AI code analysis, Greptile prompts, codebase understanding, debugging, code changes, performance evaluation, security analysis |
Greptile AI Code Analysis: Comprehensive Prompt Guide for Developers |
Discover how to leverage Greptile AI for codebase understanding, debugging, complex code changes, third-party integrations, and performance analysis with our detailed prompt guide. |
Like with many LLM-powered tools, it can be hard to know exactly what you can do with Greptile. This page goes over some usecases that we have seen developers enjoy. While this guide is mainly meant for our codebase Q&A web app it applies to all other interfaces as well, including the API.
Example transcript: Adding new keybindings to a VS Code extension
Greptile can help developers understand how a repo works, or how a specific part of it works by providing simple explanations and specific code reference links.
Examples
- "How does auth work in this codebase?"
- "Where is the code that cleans user inputs sent via the API?"
- "What does the
api/proc.ts
file do?"
Many developers use Greptile on open source repos related to their work, to understand how things are implemented there.
Example transcript: Debugging an issue in Ubicloud
Given an error message, stack trace, or simply a description of unexpected behavior, Greptile can diagnose the cause and suggest a fix with corrected code.
Examples
- "Why am I getting a
FileNotFound: Object has no attribute c://
error when I callsignal.parse()
?" - "When I click on the profile drop-down, the page refreshes. Why?"
- "
[...Stack trace/error messages]
- why is this happening?"
Example transcript: Adding support for custom SQL in Prisma
Given a description of a task or ticket, Greptile can use its understanding of the codebase to map out the steps needed to fulfill the task. It can generate the required code and tell you exactly where in the codebase to put it.
Examples
- "How do I make it so the sidebar toggle state is stored in local storage?"
- "How do I modify the chat history so users can rename their old chats?"
- "Help me modify the express router to add suport for session tokens?"
Example transcript: Integrating Helicone with NextAuth
You can add multiple repos to the same Greptile session. For example, you can add your-org/your-backend
and nextauthjs/next-auth
to the same session and ask "How do I add sign-in with google to your-backend
using nextauth
?
Examples
- Add
stripe/stripe-node
and ask "How do I add usage-based billing toyour-backend
?" - Add
twilio/twilio-ruby
and ask "How do I stream my LLM output fromyour-frontend
to the twilio SDK?
Suspect that a bug in your app might be related to an open-souce dependency? You can add its repo to your session so Greptile search it to help with diagnosis.
Example transcript: Finding ways reduce latency in Helicone proxies
Greptile can help find opportunities for performance and security improvements. Simply point it to a file or directory, and ask!
Examples
- "Are there any security concerns in
api/auth
?" - "How can I make the parser faster?"
- "How do I modify
db_connector
to be more scalable?"
Greptile is built on LLMs, and may not answer comprehensively when asked about security concerns. The responses should be viewed as a guide, not as a source of absolute truth.
Generally speaking, Greptile performs better when the instructions are more specific and as much information is provided as possible.
Here are some tips:
Mention symbols: If you have some guess on where in the codebase the answer might be, including symbol names can help Greptile find answers better. Include detail: Be verbose when possible. When debugging, provide all the information you are getting from console, such as error messages and stack traces. Be specific about output format: If you want code to be generated, say "generate the full code for this". If you could like the answer to be short, say "Answer in one sentence."
Like with all LLM prompting, you will discover subtleties over time about how to make Greptile work best with your codebase and your usecase. If you would like to report a prompting quirk, tell us! It helps us make Greptile better.