Skip to content

Add LLM information extraction example#1595

Open
Sarthak-commits wants to merge 4 commits into
apache:mainfrom
Sarthak-commits:llm-information-extraction-example
Open

Add LLM information extraction example#1595
Sarthak-commits wants to merge 4 commits into
apache:mainfrom
Sarthak-commits:llm-information-extraction-example

Conversation

@Sarthak-commits

Copy link
Copy Markdown

Closes #241.\n\nAdds a Hamilton LLM workflow example for structured information extraction from customer feedback. The example defines a Pydantic output schema, builds the extraction prompt, calls the OpenAI chat API, parses the JSON response, and validates it before returning serializable records.\n\nThe runner also supports a mocked response so the validation path can be exercised without an API key.

@jernejfrank jernejfrank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thankl you for submitting this. Could you also:

  1. save the dag representation as a PNG (driver has a method for this already) and embed it in the README?
  2. Create a jupyter notebook that does the same as run.py and allows users to walk through the example in that way (see other examples)?

@Sarthak-commits

Copy link
Copy Markdown
Author

Yeah sure i will submit it, give me some time i am out of town for the moment.

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.

[good first issue - advanced][Example] Create a dataflow modeling information extraction using an LLM

2 participants