Perplexed.Answer.Candidate (Perplexed v0.2.0)

Copy Markdown View Source

One unique search hit an answer considered.

relevance (0 to 1) and reason come from the ranking call, which sees the title, URL and description, plus the signals the search provider gave: publication date, site name, the provider's own relevance score and authority tier (DeepSeek), and the engines that agreed on it (SearXNG). content is page text the provider returned with the hit; when it reads well, the answer uses it instead of scraping the page. queries lists every query that returned the hit. status is what happened to it:

  • :used - scraped and given to the summary.
  • :unreadable - kept, but every scraper failed; scrape_error says why.
  • :duplicate - scraped, but it landed on a page another source already covers.
  • :not_needed - kept, but max_sources was already filled.
  • :dropped - ranked below min_relevance.

Summary

Types

status()

@type status() :: :used | :unreadable | :duplicate | :not_needed | :dropped

t()

@type t() :: %Perplexed.Answer.Candidate{
  content: String.t() | nil,
  description: String.t() | nil,
  engines: [String.t()],
  id: pos_integer(),
  metadata: map(),
  published_at: String.t() | nil,
  queries: [String.t()],
  reason: String.t() | nil,
  relevance: float() | nil,
  scrape_error: term(),
  status: status(),
  title: String.t() | nil,
  url: String.t()
}