Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 1014 Bytes

File metadata and controls

21 lines (11 loc) · 1014 Bytes

Consistent JSON with Language Models

License: MIT

Introduction

Working with language models like Google Gemini often results in inconsistent and unstructured JSON outputs. This project aims to solve this by implementing a 9 Step approuch to ensure a consistent JSON structure, this is beneficial for application development.

For more detailed information, please refer to my blog post on the project.

Features

  • Pydantic Model Integration: Utilize Pydantic models to define and validate JSON structure.
  • Optimized Prompt Engineering: Enhance language model prompts for more consistent responses.
  • JSON Extraction and Validation: Reliable methods to extract and validate JSON from model responses.

Example Application

Included is a 'Simple Blog Title Generator Tool' demonstrating the practical application of the project.