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

# How NBQ works

> From a question set to the decision returned at every turn.

NBQ separates two moments: **preparing the journey** and **running a conversation**.

## 1. Prepare a configuration

A configuration contains:

* a qualification objective;
* sub-objectives such as *need*, *budget*, and *timeline*;
* the questions the engine may propose;
* success information to collect;
* simple journey length and ordering rules.

Changes remain in a **draft** and do not affect the version currently used by visitors.

## 2. Publish a version

Publishing validates the draft and starts an asynchronous compilation. Once it succeeds, a new version becomes active.

<Info>
  Closing NBQ Studio does not stop a compilation. Work continues on the server and its status remains available through the compilation identifier.
</Info>

## 3. Decide during the conversation

For every answer, your backend calls `/v1/sessions/{session_id}/next`. NBQ:

1. understands the previous turn or applies its structured answer;
2. updates what is known;
3. recalculates progress;
4. removes forbidden or resolved questions;
5. ranks the remaining questions and returns the best candidates.

A choice answer can be applied deterministically. Free text may require semantic analysis. If this analysis is unavailable, the API reports degraded operation through `degraded` and `degraded_reasons`.

## What the public API exposes

The public API exposes the decision, questions, useful state, and progress. It does not expose internal prompts, embeddings, detailed evidence, or ranking parameters.

<Card title="Session lifecycle" icon="arrows-rotate" href="/en/concepts/session-lifecycle">
  Learn how to combine session creation, turns, events, reads, and feedback.
</Card>
