Extended or minimal Schemas for tool parameters?

The documentation says that the parameters element in the tool definition structure (https://platform.openai.com/docs/api-reference/chat/create#chat-create-tools) should be a JSON Schema object.
The example given is a minimal schema - but tools like pydantic generate extended schemas which for example include ‘title’ fields. Taking the documentation by word these extended schemas should be acceptable by the API - but I guess there will be differences in how good the LLM complies with the schema depending on what schemas it was trained/fine tuned on.

I have not discovered any good way to generate a minimal schema with pedantic (here is my question on pydantic forum: What is a good way to remove the 'title' field from json schemas - to make them usable in OpenAI chatcompletions calls? · pydantic/pydantic · Discussion #8504 · GitHub). Many libraries remove the ‘title’ fields - so this might be indicator that minimal schemas are better. But has anyone checked this?

here are my thoughts:

  1. title is optional JSON Schema Validation: A Vocabulary for Structural Validation of JSON
  2. why waste tokens with redundant information?
  3. redundant information has a potential to confuse the model

here are my opinions:

  1. i dislike python
1 Like

You might want to check out this threead