Use Cases/Developer Experience

Contextual help inside your product

Answers in-app, so users never leave the flow.

The pain

Users hit a confusing screen, cannot find help without leaving your product, and either abandon the task or file a ticket. Your help center gets traffic, but the drop-off happens in-app, where the docs are not.

How BeforeQuery solves it

Embed BeforeQuery with the React SDK or the drop-in widget in chat, sidebar, or Cmd+K mode. Users ask from the screen they are stuck on and get cited answers without context-switching; the headless useBeforeQueryChat hook lets you build fully custom in-product experiences on the same API.

How it works

  1. 1Index your docs and help center as sources.
  2. 2Embed help in-app: the drop-in widget in chat, sidebar, or Cmd+K mode, or the React SDK.
  3. 3Users ask from the screen they are stuck on and get cited answers without leaving the flow.
  4. 4For fully custom UIs, the headless useBeforeQueryChat hook drives the same API.

What you get

Answer users at the moment of confusion instead of after the context switch.
Reduce in-app abandonment on confusing screens.
Ship help UI in an afternoon with the widget, or build fully custom with the hook.
Keep in-app answers identical to your help center's — one knowledge index.

Features that make it work

@beforequery/react SDK
Widget sidebar & Cmd+K modes
Headless chat hook
Public client keys

Frequently asked questions

What integration options are there?

Three tiers: the drop-in widget (one script tag; chat, sidebar, or Cmd+K modes), the @beforequery/react component <BeforeQueryChat />, and the headless useBeforeQueryChat hook plus @beforequery/sdk for fully custom UIs on web, React Native, or Node.

Is it safe to ship a key in client-side code?

Yes — public client keys (bq_pk_…) are designed for the browser and grant access only to the specific project and endpoints they were issued for. Backend integrations use a separate client ID/secret pair that stays server-side.

Can the widget match our product's look?

The widget is themable, and enterprise plans can hide BeforeQuery branding. For pixel-perfect control, the headless hook lets you own every element of the UI.

How long does setup take?

Most teams are live the same day. You connect a source — a docs URL, GitHub repo, Notion workspace, or a file upload — and BeforeQuery crawls, normalizes, chunks, and embeds the content automatically. The website widget is a single script tag, and the Slack/Discord bots install in a few clicks. There is no model to fine-tune and no infrastructure to run.

Are answers backed by citations?

Yes. Every answer includes a structured citations list with the URL, title, and excerpt of each source used, and the answer text cites sources inline. Users can click through to verify any claim against the original document — which is what makes the answers trustworthy enough for support, sales, and internal use.

Is my content used to train AI models?

No. Your indexed content, embeddings, and conversations are isolated to your workspace and are only used to answer your own questions. Content is never shared across customers, and data is encrypted at rest and in transit. Enterprise plans add OIDC/SAML SSO, audit logs, and data-residency options.

Which knowledge sources can I connect?

18+ source types: websites, GitHub, GitLab, Notion, Confluence, Google Drive, SharePoint, Shopify, Zendesk, Jira, Linear, Salesforce, Slack, Discourse, Stack Overflow, YouTube, OpenAPI specs, and direct file uploads (PDF, Markdown, TXT, HTML). Sources sync on a schedule, and GitHub/GitLab can re-index automatically via webhooks on every push.

What happens when the AI is not confident in an answer?

Answers are confidence-scored. When retrieval confidence falls below your threshold, BeforeQuery returns a transparent, configurable fallback — typically pointing users to your support channel — instead of guessing. Those unanswered questions are logged in knowledge gap analytics so you can close the gap in your docs.

Ready to contextual help inside your product?

Connect your knowledge sources and see cited AI answers in minutes — free, no credit card required.

Get Started Free