--- title: Reasoning traces | Adaption description: Add explicit reasoning steps to adapted completions with recipe_specification.recipes.reasoning_traces. --- **Reasoning traces** are part of Adaptive Data’s **recipe library**—alongside options such as deduplication and prompt rephrasing—so you can shape *how* models reason over your data, not only the final string. Traces expose an intermediate reasoning path with each adapted completion. That supports **auditability** (you can inspect *how* an answer was derived), **distillation**, and supervised fine-tuning that teaches models to show structured reasoning before you strip traces for production. In the SDK this is a **recipe** toggle under `recipe_specification`, not a `brand_controls` field. Exact output shape (how the trace relates to the completion) depends on the API and recipe version. Inspect downloaded results and the [API Reference](/api/index.md) for `RecipeSpecification` and response types. ## Configure a run ``` run = client.datasets.run( dataset_id, column_mapping={ "prompt": "instruction", "completion": "response", }, recipe_specification={ "recipes": { "reasoning_traces": True, }, }, ) ``` ## Full example ``` import os import time from adaption import Adaption, DatasetTimeout client = Adaption(api_key=os.environ["ADAPTION_API_KEY"]) dataset_id = os.environ.get("ADAPTION_DATASET_ID") if not dataset_id: result = client.datasets.upload_file("training_data.csv") dataset_id = result.dataset_id while True: st = client.datasets.get_status(dataset_id) if st.row_count is not None: break time.sleep(2) run = client.datasets.run( dataset_id, column_mapping={"prompt": "instruction", "completion": "response"}, recipe_specification={"recipes": {"reasoning_traces": True}}, ) print(f"Run started: {run.run_id}, ~{run.estimated_credits_consumed} credits") try: final = client.datasets.wait_for_completion(dataset_id, timeout=3600) print(f"Finished: {final.status}") if final.error: raise RuntimeError(final.error.message) except DatasetTimeout: print("Timed out — check status manually") url = client.datasets.download(dataset_id) print(f"Download: {url}") ``` ## Combining with other recipes `RecipeSpecificationRecipes` includes additional toggles (for example `deduplication`, `preference_pairs`, `prompt_rephrase`). Set multiple keys under `recipes` in one run; omitted keys keep backend defaults. ## When to use it Use reasoning traces when **interpretable intermediate steps** matter: debugging adaptation quality, building chain-of-thought–style training data, or meeting internal review requirements. Omit them when you only need short final answers and want to minimize tokens and cost.