Extracting Topics from Survey Text with h2oGPTe RAG
- Generative AI
- Enterprise h2oGPTe
This lesson works through a realistic survey analysis example in Enterprise h2oGPTe: loading a text file of simulated survey responses to the question of why people want to lose weight into a new collection, then using the mixed RAG option to ask for the top 10 topics mentioned. It shows how refining the prompt step by step, first asking for shorter one or two word topics, then asking for the result as a Python list, turns a wordy first answer into a clean, structured output ready to use directly in Python code.
Key takeaways
- How loading a text file of survey answers into a new collection sets it up for RAG based question answering in h2oGPTe
- Why the mixed RAG option needs a description of what the document contains and how its content is formatted
- How refining a prompt from a general topic request to asking for one or two word topics shortens and sharpens the answer
- How asking the LLM to format its answer as a Python list turns a text response into something usable directly in code
Start owning your AI