# `Perplexed.Answer`
[🔗](https://github.com/agoodway/perplexed/blob/v0.2.0/lib/perplexed/answer.ex#L1)

The result of `Perplexed.answer/2`.

  * `answer` - the summary text, with inline `[n]` citations, or the
    validated object when the call passed a `:schema`.
  * `sources` - the pages the summary was written from, numbered as the
    citations number them (`Perplexed.Answer.Source`).
  * `cited` - the source numbers the text answer actually cites.
  * `considered` - every unique search hit, with its relevance score, the
    ranker's reason, and what happened to it (`Perplexed.Answer.Candidate`).
  * `queries` - the search queries that ran.
  * `usage` - token counts and USD cost by step; `trace` - one entry per
    model call, search and scrape.

# `t`

```elixir
@type t() :: %Perplexed.Answer{
  answer: String.t() | map(),
  cited: [pos_integer()],
  considered: [Perplexed.Answer.Candidate.t()],
  model: Perplexed.model_spec(),
  queries: [String.t()],
  query: String.t(),
  sources: [Perplexed.Answer.Source.t()],
  trace: [map()],
  usage: map()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
