>"Using DSPy to automatically create, evaluate, and optimize your prompts"
Manual prompt engineering is often slow and unreliable due to unpredictable inputs. DSPy addresses this by treating prompt development like traditional ML training. It automatically generates, evaluates (using "LLM-as-a-judge"), and optimizes prompts based on high-level task descriptions, providing a faster, more systematic way to build robust LLM applications.
Local large language models often struggle with ambiguous prompts because they lack the massive datasets and scale used by cloud-based AI to infer user intent. To improve accuracy, users can implement a custom system prompt that instructs the model to ask up to three targeted clarifying questions before performing complex tasks like coding or writing. This approach reduces errors caused by incorrect assumptions and helps refine user instructions through active dialogue.
>"""When tasked with coding, writing, editing, or summarizing, ask the user up to three targeted clarifying questions. Proceed with the task once you've received answers and understand the prompt fully. If the task is a simple factual question or conversational message, respond directly.
"""
Simon Willison discusses why requesting HTML rather than Markdown as an LLM output format can significantly enhance technical explanations. While token constraints previously favored Markdown, modern models benefit from the ability of HTML to incorporate SVG diagrams, interactive widgets, and improved navigation. The article provides prompt examples for reviewing pull requests via HTML artifacts and showcases a GPT-5.5 generated explanation of a Linux security exploit that uses CSS and JavaScript to create a rich documentation experience.
This handbook provides a comprehensive introduction to Claude Code, Anthropic's AI-powered software development agent. It details how Claude Code differs from traditional autocomplete tools, functioning as an agent that reads, reasons about, and modifies codebases with user direction. The guide covers installation, initial setup, advanced workflows, integrations, and autonomous loops. It's aimed at developers, founders, and anyone seeking to leverage AI in software creation, emphasizing building real applications, accelerating feature development, and maintaining codebases efficiently. The handbook also highlights the importance of prompt discipline, planning, and understanding the underlying model to maximize Claude Code's capabilities.
This article explains how to implement function calling with Google’s Gemma 3 27B model. It covers the concept of function calling, the step‑by‑step workflow, and provides a practical example using a Python `convert` function to turn $200,000 into EUR. The post walks through prompting Gemma, parsing its `tool_code` output, executing the function with `eval`, and returning a friendly final response. It also demonstrates how to set up the Google‑GenAI SDK, create a chat session, and extract tool calls. The discussion highlights Gemma’s multilingual, multimodal, and agentic capabilities, making it suitable for real‑world AI assistants that need to interact with external APIs and tools.
Prompt caching significantly reduces LLM costs and latency by storing and reusing responses to repeated or similar prompts. The core technique involves checking a cache before sending a prompt to the LLM, retrieving a prior result if available. Effective caching requires balancing cache size, retrieval speed (using methods like vector databases), and strategies for handling slight prompt variations.
This article discusses how to conduct long-term research effectively using AI as a partner, moving beyond single-prompt queries. It emphasizes the need for "Long-Term Triangulation" – a continuous, iterative methodology. The author outlines four key pillars: building a persistent memory for the AI, tracking shifts in the AI's understanding, actively critiquing its responses with contradictory data, and performing meta-audits to identify blind spots in the research process. The goal is to foster productive friction and avoid intellectual echo chambers, ensuring both the human and the AI think critically.
Comprehensive guide to prompt engineering techniques for Claude's
latest models, including Claude Opus 4.6, Claude Sonnet 4.6, and
Claude Haiku 4.5. It covers foundational techniques, output
control, tool use, thinking, and agentic systems.
This article discusses how to effectively prompt local Large Language Models (LLMs) like those run with LM Studio or Ollama. It explains that local LLMs behave differently than cloud-based models and require more explicit and structured prompts for optimal results. The article provides guidance on how to craft better prompts, including using clear language, breaking down tasks into steps, and providing examples.
An exploration of Claude 3 Opus's coding capabilities, specifically its ability to generate a functional CLI tool for the Minimax algorithm with a single prompt. The article details the prompt used, the generated code, and the successful execution of the tool, highlighting Claude's impressive one-shot learning and code generation abilities.