Skip to content
smol.Docs

    Open console

    Use a versioned policy in an inference request

    Give an endpoint a shared policy, verify a pinned answer and then switch to the latest version without changing the caller.

    A support backend should answer from its approved return policy, not from a policy copied into code. In this walkthrough you publish a policy, update it, and use the same credential, model and question to distinguish two endpoint configurations. No Application registration or fact extraction is needed.

    Before you begin: Use a ready test endpoint and an organization owner or admin session with MFA. Do not use a shared production endpoint: changing automatic context affects other authorized callers too. The configuration and readback steps do not send a generation. If you choose to run the two examples, each is an intentional model call and may incur provider charges.

    1. Open Context Spaces → New context space, name it Aurora tutorial, and choose Create context space.

    2. In its Content tab, select Add source, name the source Aurora Kit returns, choose Text, and paste this passage:

      An unopened Aurora Kit may be returned within 30 days. Its return authorization code is AUR-30.

    3. Choose Add source. Open the resulting row and confirm version 1 contains both facts.

    4. Open Inference → your test endpoint → Context → Add context space and attach Aurora tutorial. In Automatic context → Configure, select that space and the Aurora Kit returns content version. Leave Follow latest context updates unchecked and save. The row should read Pinned. Attaching the space alone does not set a default.

    In Context Spaces → Aurora tutorial → Content, open Aurora Kit returns → Update source. Replace the entire passage with:

    An unopened Aurora Kit may be returned within 45 days. Its return authorization code is AUR-45.

    Save the update. In Version history, open each version and check its window and code. The source now says 45 days, but a default pinned when v1 was current still points to 30 days. This lets you test both configurations against the same published document, without modifying it again.

    1. Open the test endpoint’s Connect → Access credentials → Create credential. Name it Aurora tutorial caller, choose a suitable expiry and save the client ID and one-time secret in a trusted backend environment. This credential inherits access to the endpoint’s attached space; there is no additional space grant to make.

    2. In Connect → Request, use this prompt. Do not put either possible answer in the question:

      According to the supplied policy, what are the return window and return authorization code for an unopened Aurora Kit? Give just the number of days and the code.

    3. Leave Use shared context unchecked in the request example. That checkbox adds an explicit context override; here you want the endpoint’s default. Confirm the generated request omits both smol_context and smol_context_mode. Do not set the mode to none: that would skip the default.

    4. Use the generated Python, JavaScript or cURL snippet from your backend. First request walks through the Python example, including how to print the reply. Keep the request’s Idempotency-Key and UTC time. If you want a live check, submit once. Expected meaning: 30 days, AUR-30. The wording can vary.

    4. Follow updates and ask the same question

    Section titled “4. Follow updates and ask the same question”
    1. Return to Inference → your test endpoint → Context and edit the Aurora tutorial row under Automatic context. Select the space/content if prompted, check Follow latest context updates, and save. The row should now read Following latest. This follows the whole space, including future sources, not only the document in this exercise.
    2. Return to Connect. Keep the same endpoint credential, model and prompt. Keep explicit context off. For this new logical request, use a fresh idempotency key; do not reuse the key from the pinned call.
    3. If running the comparison, submit once. Expected meaning: 45 days, AUR-45. No credential rotation or backend code change was needed.
    Mode during the call Source current in the space Expected facts in the answer
    Pinned to v1 v2 30 days · AUR-30
    Following latest v2 45 days · AUR-45

    In the endpoint’s Activity, inspect the two requests by Smol request ID when available, or match each row to its caller and UTC time. The request ID is not the idempotency key. Check each outcome and compare the actual reply to the expected facts. In Insights → Context, filter to the endpoint and period and inspect Content used by your applications for the corresponding version inclusions. That table aggregates activity; it is not a substitute for the individual request record.

    A correct answer demonstrates use consistent with the policy in this example. It does not establish a provider cache hit, avoided compute or financial savings. If you skipped both calls, version history and the automatic context row confirm the saved configuration only; they do not demonstrate an inference outcome.

    Wrong facts? Check which endpoint received the request, Pinned versus Following latest, and whether the body accidentally specifies old handles or skips context. If Activity shows both requests completed but an answer is wrong, record it as an answer-quality result rather than rerunning until it changes. If a response was interrupted, check the existing outcome before sending anything else.

    Clean up: In Connect, Revoke the tutorial credential and confirm its name. In Context, remove the tutorial space attachment and confirm the removal of its automatic selection. The source and its version history remain in the space. Revoking credentials or detaching a space does not stop GPU compute; if you created a dedicated deployment, use deployment cleanup separately.