Skip to content

Phase 5: add AI-era application patterns module - #15

Merged
Janaka2 merged 1 commit into
masterfrom
codex/add-ai-application-patterns-module
Apr 10, 2026
Merged

Janaka2 merged 1 commit into
masterfrom
codex/add-ai-application-patterns-module

Conversation

@Janaka2

@Janaka2 Janaka2 commented Apr 10, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Introduce practical, testable AI application patterns for prompt assembly, lightweight RAG, model orchestration, tool integration, safety/policy enforcement, and repeatable evaluation.
  • Provide small, composable building blocks that teams can copy into services and unit-test locally.

Description

  • Add new package org.example.ai containing PromptBuilder, RetrievalPipeline, LlmClient (interface), FallbackModelStrategy, ToolAgentFacade, PolicyEnforcedLlmClient, and EvaluationHarness to implement the patterns above in a focused, library-style API.
  • PromptBuilder implements template substitution, and RetrievalPipeline separates retrieval and reranking and produces a bounded context window for prompts.
  • ToolAgentFacade routes tool:<name>:<input> tool invocations and composes retrieval context into LLM prompts via LlmClient, while FallbackModelStrategy fails over across multiple LlmClient implementations.
  • PolicyEnforcedLlmClient decorates an LlmClient with input validation, PII masking, and output filtering policies, and EvaluationHarness provides golden-set and statistical evaluation helpers; README.md and docs/phase-5-ai-era-patterns.md were updated to document the phase and examples.

Testing

  • Added AiApplicationPatternsTest which asserts RAG-lite + facade orchestration, tool invocation, fallback model behavior, policy masking/filtering, and golden/statistical evaluation flows.
  • Ran mvn -Dtest=AiApplicationPatternsTest test in this environment but the build failed to start tests due to external artifact resolution failure (Maven Central returned HTTP 403 resolving maven-enforcer-plugin:3.5.0).
  • Because of the Maven resolution error the new tests were not executed here, but they are included in the repository and should run in a network-enabled CI environment where Maven Central is accessible.

Codex Task

@Janaka2
Janaka2 merged commit 6cfd570 into master Apr 10, 2026
0 of 2 checks passed
@Janaka2
Janaka2 deleted the codex/add-ai-application-patterns-module branch April 10, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant