Skip to content

feat: Add Google Gemini support to 01-foundations/02-prompt-engineering - #51

Open
AmeyaMprojects wants to merge 1 commit into
agenticloops-ai:mainfrom
AmeyaMprojects:main
Open

feat: Add Google Gemini support to 01-foundations/02-prompt-engineering#51
AmeyaMprojects wants to merge 1 commit into
agenticloops-ai:mainfrom
AmeyaMprojects:main

Conversation

@AmeyaMprojects

@AmeyaMprojects AmeyaMprojects commented Jul 7, 2026

Copy link
Copy Markdown

This pull request adds native support for Google Gemini models across the entire 02-prompt-engineering foundational module. It expands the repository's educational coverage by demonstrating how first-principles prompting layered concepts (system configuration, few-shot structures, and native JSON constraints) map to the official, modern google-genai SDK.
Changes Included

03_system_prompts_gemini.py: Parallels the existing Anthropic and OpenAI implementations to demonstrate role engineering, progressive constraint adjustment, and system instruction patterns using types.GenerateContentConfig(system_instruction=...).

06_few_shot_cot_gemini.py: Implements zero-shot, custom label few-shot classification, and sequential reasoning via Chain-of-Thought (CoT) setups.

09_structured_output_gemini.py: Compares manual, prompted extraction schemas against Gemini’s strict, native schema enforcement using Pydantic models fed directly into response_schema.

common.py: Integrated a robust token tracker class (GeminiTokenTracker) to capture and expose upstream billing details (prompt_token_count / candidates_token_count) seamlessly alongside existing provider trackers.

README.md: Updated to complete the sequential 1-9 numbering of files, adding architectural script snippets and updating comparative provider tables.

Testing & Verification

All scripts have been tested locally via uv run environments using a gemini-2.5-flash model target under zero-temperature configurations.

System routing and conditional menus match interactive performance logs identically.

Structural JSON calls passed string extraction clean tests and verified completely against strict native schema blocks.

@AmeyaMprojects

Copy link
Copy Markdown
Author

Let me know if this is fine so i can work on other folders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant