shashank ms Posted on Jun 17 Introduction to LLMs for Beginners # learnai # oxlo # ai We're going to build a command-line Topic Explainer that takes any subject and breaks it down for a chosen audience, from absolute beginner to expert. This is a solid first project if you are just getting started with LLMs because it teaches system prompts, message history, and streaming in one small script. I have shipped dozens of these internal tools, and this is the exact pattern I reach for first. What you'll need Python 3.10 or newer. The OpenAI SDK: pip install openai An Oxlo.ai API key from https://portal.oxlo.ai . The free tier includes 60 requests per day across 16 models, which is plenty for this tutorial. Step 1: Send your first prompt Before we add any abstractions, we will wire up the Oxlo.ai client and make a single chat completion to verify the endpoint and credentials. I am using llama-3.3-70b here because it is a reliable general-purpose flagship model. from openai import OpenAI client = OpenAI(base_url="https://api.oxlo.ai/v1", api_key="YOUR_OXLO_API_KEY") user_message = "Explain how a large language model works." response = client.chat.completions.create( model="llama-3.3-70b", messages=[ {"role": "user", "content": user_message}, ], ) print(response.choices[0].message.content) Step 2: Add a system prompt Raw completions can wander. We will lock the behavior down with a system prompt so the assistant always explains topics at the requested level and keeps answers concise. Here is the system prompt I use for this agent. You can tune the rules later. SYSTEM_PROMPT = """You are a patient technical tutor. Your job is to explain any topic at the exact level the user asks for. If the user asks for a "beginner" explanation, use simple analogies and avoid jargon. If they ask for "expert" detail, be precise and technical. Always keep your answer under three paragraphs unless the user asks for more.""" Now we pass it into the messages array. from openai import OpenAI clie
LIVE
