Skip to main content

Amos Chen

I’m only human

Recent

7 - Getting Structural Output from Large Language Model (LLM)
·1952 words·10 mins
Hands-on guide to forcing LLMs to return perfect JSON using Pydantic schemas + few-shot examples + Ollama/Bedrock structured output features, with ready-to-run code for serverless Python apps.
6 - A Small Step Towards Production Readiness
·1230 words·6 mins
This post guides us through improving Python code quality using Ruff, a fast linter and formatter, and pre-commit for automated checks. It also covers structuring LLM prompts with a Prompt model for scalable AI integrations, including updates to Ollama and Bedrock chat services.
5 - Summarize Web Content using Amazon Bedrock
·1354 words·7 mins
This article guides you through building a modular Python application to leverage Large Language Models (LLMs) with AWS Lambda. Learn to set up AWS CLI with IAM Identity Center, create a Bedrock Chat Service, implement web scraping and summarization, and automate Lambda deployment with a ZIP file. Includes practical code examples and verification steps.
4 - Summarize Web Content using Ollama
·775 words·4 mins
This guide shows how to create a modular Python application for web scraping and AI summarization using BeautifulSoup and Ollama. It covers organizing scraper and chat services into a reusable module, integrating them in a main script, and generating summaries from online content.
3 - Fetch HTML with an URL
·2418 words·12 mins
This guide explores how to use BeautifulSoup to extract plain text from URLs and build a reusable web scraper for integration into AI-driven applications like AWS Lambda. It includes step-by-step instructions for creating and testing a Python-based scraper with a modular class design.