Tutorial #13: StrictJSON, my first Python Package! - Get LLMs to output into a working JSON!

Subscribers:
5,330
Published on ● Video Link: https://www.youtube.com/watch?v=1N-znDTlhNc



Duration: 15:21
490 views
22


Github: https://github.com/tanchongmin/strictjson

To install and use:
1. "pip install strictjson"
2. Enter OpenAI API Key
3. "from strictjson import *"

Most output from LLM can be reliably parsed in JSON format. The problem - this JSON format may not load well into json.loads() and hence cannot be interpreted easily.

Here is where StrictJSON shines. Using a special regex, it extracts out the keys and values of the JSON reliably. Here, I am treating JSON as a Python dictionary, and it can extract out the keys and values reliably.

I have also added in a new feature, StrictJSON functions, where you can use the LLM as a function by some typing in the function description and the output format.

Moving on, I intend to develop more functionality with JSON as the root mode for data storage. Future works involve agents with tool use, and conversational agents. Stay tuned!

~~~~~~~~

0:00 StrictJSON Output Parsing
3:00 StrictJSON Functions
8:28 Type Specificity Hints
10:19 Under the hood of how StrictJSON works

~~~~~~~~

AI and ML enthusiast. Likes to think about the essences behind breakthroughs of AI and explain it in a simple and relatable way. Also, I am an avid game creator.

Discord: https://discord.gg/bzp87AHJy5
LinkedIn: https://www.linkedin.com/in/chong-min-tan-94652288/
Online AI blog: https://delvingintotech.wordpress.com/
Twitter: https://twitter.com/johntanchongmin
Try out my games here: https://simmer.io/@chongmin




Other Videos By John Tan Chong Min


2024-03-18CRADLE (Part 2): An AI that can play Red Dead Dedemption 2. Reflection, Memory, Task-based Planning
2024-03-11CRADLE (Part 1) - AI that plays Red Dead Redemption 2. Towards General Computer Control and AGI
2024-03-05TaskGen - A Task-based Agentic Framework using StrictJSON at the core
2024-02-27SymbolicAI / ExtensityAI Paper Overview (Part 2) - Evaluation Benchmark Discussion!
2024-02-20SymbolicAI / ExtensityAI Paper Overview (Part 1) - Key Philosophy Behind the Design - Symbols
2024-02-13Embeddings Walkthrough (Part 2): Context-Dependent Embeddings, Shifting Embedding Space
2024-02-06Embeddings Walkthrough (Part 1) - Bag of Words to word2vec to Transformer contextual embeddings
2024-01-29V* - Better than GPT-4V? Iterative Context Refining for Visual Question Answer!
2024-01-23AutoGen: A Multi-Agent Framework - Overview and Improvements
2024-01-09AppAgent: Using GPT-4V to Navigate a Smartphone!
2024-01-08Tutorial #13: StrictJSON, my first Python Package! - Get LLMs to output into a working JSON!
2023-12-20"Are you smarter than an LLM?" game speedrun
2023-12-08Is Gemini better than GPT4? Self-created benchmark - Fact Retrieval/Checking, Coding, Tool Use
2023-12-04Learning, Fast and Slow: 10 Years Plan - Memory Soup, Hier. Planning, Emotions, Knowledge Sharing
2023-12-01Tutorial #12: Use ChatGPT and off-the-shelf RAG on Terminal/Command Prompt/Shell - SymbolicAI
2023-11-20JARVIS-1: Multi-modal (Text + Image) Memory + Decision Making with LLMs in MineCraft!
2023-11-20Tutorial #11: Virtual Persona from Documents, Multi-Agent Chat, Text-to-Speech to hear your Personas
2023-11-14A Roadmap for AI: Past, Present and Future (Part 3) - Multi-Agent, Multiple Sampling and Filtering
2023-11-07Learning, Fast and Slow: My Landmark Idea for fast, adaptable agents (ICDL 2023 Best Paper Finalist)
2023-11-06A roadmap for AI: Past, Present and Future (Part 2): Fixed vs Flexible, Memory Soup vs Hierarchy
2023-11-03AI & Education: Education when AI tools are smarter than us - Discussion with Kuang Wen (Part 2)