DEV Community

shashank ms
shashank ms

Posted on

Qwen 3 32B Model Overview

We are building a multilingual research agent that reasons through a technical topic and returns a structured markdown brief in the language of your choice. This helps platform engineering teams who need fast, localized summaries without chaining multiple single-language models. We will run it on Qwen 3 32B through Oxlo.ai, where request-based pricing keeps the cost of long system prompts and multi-turn agent loops predictable. See https://oxlo.ai/pricing for plan details.

What you'll need

A free Oxlo.ai account includes 60 requests per day, which is enough to prototype this agent.

Step 1: Configure the Oxlo.ai Client

Import the SDK and point it at Oxlo.ai. We will use Qwen 3 32B for its multilingual reasoning and agentic planning capabilities.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.oxlo.ai/v1",
    api_key=os.environ.get("OXLO_API_KEY", "YOUR_OXLO_API_KEY")
)

Step 2: Define the Agent's System Prompt

Qwen 3 32B handles long instructions well, so we can give it a detailed system prompt that enforces structured output and citation discipline.

SYSTEM_PROMPT = """You are a precise technical research agent powered by Qwen 3 32B.
Your task is to investigate a topic and produce a structured markdown report.

Follow these rules exactly:
1. First, output a "Research Plan" section with exactly 3 investigation angles.
2. Then, output a "Findings" section with concise paragraphs for each angle.
3. Finally, output a "Summary" section with 2 bullet points.
4. If the user requests a language other than English, translate the entire report into that language while preserving technical terminology.
5. Do not invent external URLs. Use only internal reasoning.

Respond in valid markdown."""

Step 3: Build the Research Function

Now we wrap the API call in a function that accepts a topic and a target language. Qwen 3 32B on Oxlo.ai uses a Mixture-of-Experts architecture that stays efficient even when the system prompt is large.

def research_topic(topic: str, language: str = "English") -> str:
    user_message = (
        f"Topic: {topic}\n"
        f"Target language for the full report: {language}\n"
        f"Produce the research plan, findings, and summary now."
    )

    response = client.chat.completions.create(
        model="qwen-3-32b",
        messages=[
            {"role": "system", "content": SYSTEM_PROMPT},
            {"role": "user", "content": user_message},
        ],
        temperature=0.2,
        max_tokens=2048,
    )

    return response.choices[0].message.content

Step 4: Add a Self-Correction Loop

To make this agentic rather than a single-shot generator, we add a second pass where the model critiques its own draft for gaps and returns a revised report. On Oxlo.ai, each turn is one request, so the cost stays predictable no matter how long the conversation grows.

def critique_and_refine(draft: str, topic: str, language: str) -> str:
    critique_prompt = (
        f"You previously wrote this draft about '{topic}':\n\n{draft}\n\n"
        f"Identify exactly one weakness or missing detail. Then rewrite the full report in {language} "
        f"with that weakness addressed. Maintain the same markdown structure."
    )

    response = client.chat.completions.create(
        model="qwen-3-32b",
        messages=[
            {"role": "system", "content": SYSTEM_PROMPT},
            {"role": "user", "content": critique_prompt},
        ],
        temperature=0.2,
        max_tokens=2048,
    )

    return response.choices[0].message.content

Step 5: Wire the Agent Together

Combine the two stages into a single callable agent class. This keeps the interface clean and makes it easy to drop into a FastAPI route or a Celery task later.

class ResearchAgent:
    def __init__(self, client: OpenAI):
        self.client = client

    def run(self, topic: str, language: str = "English") -> str:
        draft = research_topic(topic, language)
        final = critique_and_refine(draft, topic, language)
        return final

agent = ResearchAgent(client)

Run It

Call the agent on a dense technical topic and request the output in Chinese to exercise the multilingual strength of Qwen 3 32B.

if __name__ == "__main__":
    topic = "Post-quantum cryptography standards for DNSSEC"
    language = "Chinese"

    report = agent.run(topic, language)
    print(report)

Example output:

## Research Plan
1. 分析NIST标准化的后量子算法在DNSSEC中的适用性
2. 评估现有DNS基础设施的迁移挑战
3. 比较混合加密方案与纯后量子方案的性能开销

## Findings
NIST于2024年发布的ML-DSA和SLH-DSA标准可通过DNSSEC的签名算法扩展机制引入。现有基础设施主要依赖RSA和ECDSA,因此需要逐步过渡。

BIND和Knot DNS已发布实验性补丁支持Ed25519与ML-DSA混合签名,但生产部署仍需等待关键软件仓库的稳定版本更新。

性能方面,ML-DSA签名尺寸较大,可能导致DNS响应包超过UDP分片阈值,从而强制使用TCP或增加分片风险。

## Summary
- DNSSEC后量子迁移需要支持Ed25519和ML-DSA的混合签名方案以降低切换风险
- 当前BIND和Knot DNS的实现进度是生产部署的主要瓶颈

Next Steps

Replace the self-correction loop with real tool use by adding Oxlo.ai function calling to query a documentation search API between drafts. You can also swap the model to Llama 3.3 70B or Kimi K2.6 inside the same client if you need a different reasoning style, since Oxlo.ai exposes all of them through the same OpenAI-compatible endpoint.

Top comments (0)