TATECHATLAS
◎ English
Home / Topics

Artificial intelligence: models and practical tasks

Language models, automation, machine learning, text, images and audio: explanations, guides and practical tips.

Explore approaches, choose models and evaluate results. This section covers context, reliable outputs, automation and different data types. Search and RAG are one direction within the section. Time series and forecasting belong to mathematics and models.

Materials

20 materials

How sort_keys in json.dumps Gives Deterministic Key Order for Comparing Model JSON Responses

sort_keys=True makes json.dumps emit dictionary keys in sorted order, so two JSON responses with the same data but different key order serialize to identical strings. Sorting happens on the original Python keys before they are converted to JSON strings, so numeric keys sort by value.

python / json / json.dumps / sort_keys / testing / deterministic-serialization / regression-tests

Handling Control Characters in Model JSON Output

This article explains how to address control characters emitted by language models in JSON output, detailing the default strict mode in Python's json.loads and strategies for graceful degradation when encountering these characters.

JSON / Python / JSONDecodeError / Control Characters / Strict Mode

Python json.dump Is Not a Framed Protocol: Why Repeated Calls Produce Invalid JSON and How to Serialize Multiple LLM Responses Safely

Python's json module explicitly warns that JSON lacks framing, so calling dump() twice on the same file object writes two adjacent documents that json.load() cannot parse. The fix is to collect objects into a list and dump once, or use newline-delimited JSON with raw_decode for streaming scenarios.

python / json / serialization / llm / json-lines / framing / json-schema / streaming

Filtered Vector Search Strategy: Applying Filters to Vector Queries in Azure AI Search

Filtered vector search in Azure AI Search combines vector similarity with metadata filtering. Pre-filtering reduces the candidate set before scoring, potentially lowering latency but risking recall loss. Post-filtering preserves recall but may return fewer results. Testing both modes is essential to find the right trade-off for your data.

Azure AI Search / vector search / filtered vector search / hybrid search / pre-filter / post-filter / semantic ranker / metadata filtering

AI Precision and Recall Evaluation on Small Datasets

Learn how to effectively evaluate the precision and recall of AI models, especially when working with small question datasets. This guide covers the concepts, calculation methods, and practical considerations using scikit-learn.

ai / precision / recall / evaluation / small dataset / machine learning / scikit-learn / classification

Understanding Semantic Search: How it Works and Why Similar Text Might Not Answer Your Question

Explore the principles of semantic search, its reliance on embeddings, and the reasons why text that appears similar might not provide the desired answer. Learn about vector search, hybrid search, and their applications in information retrieval.

semantic search / vector search / embeddings / AI / information retrieval / natural language processing / hybrid search / Azure AI Search

Choosing RAG Chunk Boundaries and Overlap to Preserve Section Context

This article explains how to choose effective chunk boundaries and overlap in retrieval-augmented generation (RAG) systems, comparing fixed-size and document-aware strategies. Using a hypothetical support note example, it demonstrates the risks of splitting across semantic units and shows how metadata and overlap can preserve context. The guidance is based on Microsoft Azure documentation for chunking in vector search and RAG workflows.

RAG / chunking / Azure AI Search / information retrieval / document processing

Verifying RAG Citations: Beyond Source Existence to Claim Support

A citation identifier only proves a source was retrieved, not that it supports the claim. This article shows how to decompose answers, locate supporting passages, and separate retrieval checks from groundedness checks using a hypothetical policy example.

RAG / citation verification / groundedness / retrieval evaluation / prompt engineering / LLM evaluation