# Pulling prompts with structured outputs

**URL:** <https://forum.langchain.com/t/pulling-prompts-with-structured-outputs/1660>\
**Category:** Observability & Evals\
**Tags:** python-help\
**Created:** [September 26, 2025, 11:51pm UTC](https://forum.langchain.com/t/pulling-prompts-with-structured-outputs/1660 "2025-09-26T23:51:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![emily](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@emily](https://forum.langchain.com/u/emily)\
**Post date:** [September 26, 2025, 11:51pm UTC](https://forum.langchain.com/t/pulling-prompts-with-structured-outputs/1660/1 "2025-09-26T23:51:33Z")

</div>

I want to use langsmith to version and iterate on my prompts. All my (prompt | model) chains require structured output. From what I can tell, if you set an output schema on a prompt (whether through the langsmith prompt playground UI directly or by adding a prompt from a trace with structured output to the playground), pull\_prompt will return a StructuredPrompt (instead of a ChatPromptTemplate). if you pull\_prompt with include\_model=True, invoking the resulting runnable gives you a python dictionary. i want my invocation result to be a pydantic model.

is there a way to pull\_prompt for a prompt with structured output, with include\_model=True, and have the invocation result be a pydantic model without having to explicitly cast/deserialize it as such?

the clearest path forward i see is to not store the the prompt with an output schema, nor include\_model. but this seems like a huge drawback wrt keeping track of all the “assets” associated with a given prompt configuration…
