Skip to content
All categories

tech

518 posts
techdeep-dive

Building a Taiwan Stock Research Agent (Part 2): LangGraph Parallel Architecture—Five Analysts Working at Once

Five analysts fan out in parallel within one superstep, so latency is max rather than sum; backtesting and reflection stand before synthesis, restricting the LLM to explaining evidence that already exists.

techdeep-dive

Building a Taiwan Stock Research Agent (Part 3): Tiered LLMs and a Degradation Chain—API, Local CLI, and Dictionary Fallbacks

Only two roles call an LLM; every other analyst remains fully programmatic. Each call follows an Anthropic API → local Claude CLI → rules-based degradation chain, and cost accounting trusts only provider-reported values—unknown cost is never treated as $0.

techdeep-dive

Building a Taiwan Stock Research Agent (Part 4): Backtest Accountability—Why Backtests Lie

This project has one core rule: every LLM conclusion must first pass a historical backtest of the same signals. When expectancy is negative, synthesis cannot issue an optimistic verdict. Each of the four traps that make backtests lie has a programmatic countermeasure.

techdeep-dive

Building a Taiwan Stock Research Agent (Part 5): Walk-Forward Evaluation, Run Cards, and an Honest 50% Baseline

I do not measure whether the agent ‘feels accurate.’ I freeze parameters in walk-forward OOS tests, record a hash of every input in run cards, and keep the honest 5/10 = 50% golden-eval baseline so the agent has to admit that it is not accurate yet.

techdeep-dive

Building a Taiwan Stock Research Agent (Part 6): Making Every Number in an LLM Report Auditable

Numbers are the easiest part of an LLM report to hallucinate. I therefore put every trusted number into a SHA-256-addressed evidence manifest and let the LLM cite only {{fact.id}} placeholders. If it writes a bare number, the entire output is discarded and replaced with a deterministic template.

techdeep-dive

Building a Taiwan Stock Research Agent (Part 7): The Copilot Loop—Plan Contracts, Verifiable Sources, and Human Review

A research request first becomes a ResearchPlan that requires human approval. External documents must be fetched in full, and verbatim quotes must be verified before they can enter a report. Quant review is always append-only, and free-text feedback never flows back into a prompt. This is the complete M5 Copilot loop.

techdeep-dive

Building a Taiwan Stock Research Agent (Part 8): The Boundary Between Research and Paper Orders—Content-Addressed Execution Contracts

Three frozen Pydantic contracts weld the boundary between a research artifact and order-placement authority shut: content addressing, eight hard gates, and paper-only execution, while the agent never touches credentials.

techdeep-dive

Building a Taiwan Stock Research Agent (Part 9): Deployment Boundaries—from Docker to a Public API on Cloudflare Containers

The full deployment path for a Python agent, from local uv run to Docker to a public API on Cloudflare Containers: the Worker enforces authentication, the Container runs FastAPI, secrets never enter the image, and the service sleeps automatically after 10 idle minutes—the right way for a side project to save money.

Ably: Global Realtime Messaging with Channels, Presence, and Recovery

Ably manages global realtime connections, channels, presence, and short-window recovery; applications still own idempotency, durable business state, token capabilities, and offline resynchronization.

Delegated Authorization for AI Agents: Do Not Hand User Tokens to the Model

An agent should execute one task with a short-lived, audience- and permission-restricted credential while preserving user and agent identities, execution-time authorization, confirmation, and audit lineage.

AI Agent Sandbox Escapes and Permission Boundaries: A Container Is Not the Whole Boundary

Agent execution must constrain kernels, filesystems, processes, networks, credentials, and tool authorization; sandbox escape is only one path, and an overpowered API token is often more direct.

Linode and Akamai Cloud: Connecting Classic VPS Compute to Edge and Managed Kubernetes

Linode is now the compute foundation of Akamai Cloud Computing; VMs, LKE, storage, and databases retain regional and network boundaries, so the Akamai brand does not imply complete integration.

techdeep-dive

Algolia Site Search Deep Dive: Hosted Indexing, Ranking, and InstantSearch

Algolia packages indexing, search-as-you-type, facets, and UI components as a hosted service; it ships quickly, but data synchronization, relevance, and usage costs remain your responsibility.

Apache Kafka: A Replayable Event Log, Not Merely a Message Queue

Kafka is a distributed log ordered by partition and retained by policy. Consumer groups divide work through offsets, while exactly-once processing holds only inside boundaries covered by Kafka transactions.

Apache Pulsar: An Event Platform Separating Stateless Brokers from BookKeeper Storage

Pulsar separates serving from storage: stateless brokers handle connections while BookKeeper stores ledgers and subscription cursors. Elasticity and multi-tenancy come with more operational components.

Appwrite: A Self-Hostable BaaS for Auth, Databases, Storage, Functions, and Realtime

Appwrite combines Auth, TablesDB, Storage, Functions, Realtime, and Messaging behind consistent APIs; Cloud and self-hosted products resemble each other but have different operational ownership.

techdeep-dive

assistant-ui Explained: Runtime and Primitives for Backend-Portable Agent Chat

assistant-ui separates Agent Chat into headless React primitives, a conversation runtime, and backend adapters, so the UI does not have to bind directly to one model SDK's message state.

AWS App Runner: The Shortest AWS Path from Source or Container to a Web Service

App Runner packages build, deployment, TLS, load balancing, and autoscaling as a web service, trading orchestration control for a simpler platform with explicit VPC, instance, and health boundaries.

AWS Fargate: No EC2 Management Does Not Mean No ECS Management

Fargate removes container-host operations, but task definitions, ECS services, VPCs, IAM, scaling, deployment, and observability remain your system.

AWS Lambda: Understand Events, Retries, and Concurrency Before Choosing Functions

Lambda fits short-lived, event-driven, bursty work; its design center is invocation, retries, idempotency, and downstream capacity—not merely smaller containers.