> ## Documentation Index
> Fetch the complete documentation index at: https://docs.potpie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Ask

> **Potpie's Q&A interface**

<img src="https://mintcdn.com/potpieai/gJ4EwDE1Ctkm-zsd/images/ask-review2.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=90121f8216cef193269f3dfa3879db45" alt="Completed response with citations" width="2876" height="1632" data-path="images/ask-review2.png" />

**Ask** answers questions about your codebase by navigating the [knowledge graph](/concepts/knowledge-graph)  to find exactly what you need to know.

When a question involves a third-party library, it retrieves external documentation via `web search` if required. Follow-up questions in the same session retain full context from what came earlier

To start using Ask, see the [Explore Your Codebase tutorial](/tutorials/explore-your-codebase).

## How It Navigates

Prior to  generating a response, Ask first classifies the question by type: **what** something does, **how** it works, **where** it lives, or **why** it was built that way.
Complex questions are broken into components and addressed one after other.

Beyond the knowledge graph, Ask reads files directly by path with optional line ranges, reads multiple files at once when broad context is needed, and searches file contents by pattern to pinpoint exact usage sites and definitions.

## How It Responds

Answers are structured with headers, code snippets, and citations to exact file locations. File paths are shown relative to the repository root. Every requirement for the question raised is verified before the response is returned.

## Using the API

The [Create Conversation and Message](/api-reference/endpoint/create-conversation-and-message) endpoint opens a session against a `ready` project and returns a cited, markdown formatted answer in a single call.

## Example uses

<CardGroup cols={2}>
  <Card title="Auth Flow" href="/examples/auth-flow">
    Understanding how authentication works before building a protected endpoint.
  </Card>

  <Card title="Refactor Scope" href="/examples/refactor-scope">
    Mapping every dependency before touching a core service.
  </Card>
</CardGroup>
