DEV Community

shashank ms
shashank ms

Posted on

Qwen 3 32B Model Details and Applications

We are building a multilingual competitive-analysis agent that takes a product description, reasons about global market positioning in three languages, and returns structured JSON. Qwen 3 32B on Oxlo.ai handles the cross-lingual reasoning, and because Oxlo.ai charges a flat rate per request instead of per token, we can feed it long product briefs without watching the meter run.

What you'll need

  • Python 3.10 or newer
  • An Oxlo.ai API key from https://portal.oxlo.ai
  • The OpenAI SDK. Install it with pip install openai

Step 1: Configure the Oxlo.ai client

I keep secrets out of source control, but for this tutorial I will initialize the client with a placeholder. The only change from a standard OpenAI setup is the base URL pointing to Oxlo.ai.

from openai import OpenAI

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

Step 2: Define the agent's system prompt

Qwen 3 32B is strong at agentic workflows and multilingual reasoning. I give it a single system prompt that forces structured output and forbids hallucinated financial data.

SYSTEM_PROMPT = """You are a multilingual market-research analyst.
When given a product description, identify the three most relevant non-English markets.
For each market:
1. State the country.
2. Explain in one sentence why the market fits.
3. List two local competitors or substitutes.
4. Rate demand as Low, Medium, or High.

Respond only in valid JSON with this exact structure:
{
  "product_summary": "string",
  "markets": [
    {
      "country": "string",
      "rationale": "string",
      "competitors": ["string", "string"],
      "demand": "string"
    }
  ]
}

Do not include markdown code fences in the output."""

Step 3: Build the research function

I wrap the API call in a small function so I can reuse it. I set the model to qwen-3-32b and enable JSON mode so the response is parseable. Oxlo.ai supports this because the endpoint is fully OpenAI compatible, and there are no cold starts on popular models like this one.

import json

def analyze_product(product_description: str) -> dict:
    user_message = f"Analyze this product for global expansion:\n\n{product_description}"

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

    raw = response.choices[0].message.content
    return json.loads(raw)

Step 4: Wrap it in a CLI loop

I add a small loop so I can paste product descriptions from my notes and get immediate feedback. I catch JSON decoding errors so a malformed response does not crash the session.

import json
from openai import OpenAI

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

SYSTEM_PROMPT = """You are a multilingual market-research analyst.
When given a product description, identify the three most relevant non-English markets.
For each market:
1. State the country.
2. Explain in one sentence why the market fits.
3. List two local competitors or substitutes.
4. Rate demand as Low, Medium, or High.

Respond only in valid JSON with this exact structure:
{
  "product_summary": "string",
  "markets": [
    {
      "country": "string",
      "rationale": "string",
      "competitors": ["string", "string"],
      "demand": "string"
    }
  ]
}

Do not include markdown code fences in the output."""

def analyze_product(product_description: str) -> dict:
    user_message = f"Analyze this product for global expansion:\n\n{product_description}"

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

    raw = response.choices[0].message.content
    return json.loads(raw)

if __name__ == "__main__":
    print("Multilingual Research Agent")
    print("Paste a product description and press Enter. Ctrl+C to quit.\n")

    while True:
        try:
            desc = input("Product: ")
            if not desc.strip():
                continue

            result = analyze_product(desc)
            print(json.dumps(result, indent=2, ensure_ascii=False))
            print("-" * 40)

        except KeyboardInterrupt:
            break
        except json.JSONDecodeError as e:
            print(f"Bad JSON: {e}")
        except Exception as e:
            print(f"Error: {e}")

Run it

Save the script as research_agent.py, install the dependency, and run it.

pip install openai
python research_agent.py

Here is a real session I ran against Oxlo.ai using Qwen 3 32B. I passed a long description of a portable solar panel targeted at digital nomads.

Product: A foldable 120W solar panel with USB-C PD and integrated 20,000 mAh battery,
designed for remote workers who camp in Southeast Asia and Latin America.
{
  "product_summary": "Foldable solar panel for remote camping workers in warm climates",
  "markets": [
    {
      "country": "Indonesia",
      "rationale": "Large digital-nomad community and unreliable rural grid",
      "competitors": ["Goal Zero Nomad 100", "local Jackery distributors"],
      "demand": "High"
    },
    {
      "country": "Mexico",
      "rationale": "Growing van-life culture and frequent power outages",
      "competitors": ["Renogy 100W suitcase", "Anker 625 Solar Panel"],
      "demand": "Medium"
    },
    {
      "country": "Vietnam",
      "rationale": "Rapidly expanding remote-work visas and tropical sun exposure",
      "competitors": ["EcoFlow 110W", "Bluetti PV120"],
      "demand": "High"
    }
  ]
}

Wrap-up

The agent works, but it is only as good as the context you give it. Two concrete next steps: add a web-search tool via Oxlo.ai function calling so the model can pull live competitor URLs, or switch to Oxlo.ai's request-based pricing at scale by feeding entire investor PDFs into the context window without per-token cost anxiety. See https://oxlo.ai/pricing for plan details.

Top comments (0)