mt7180 / quaigle

RAG-based LLM application: project to explore different llm-frameworks like llamaindex, marvin and langchain, other used frameworks: streamlit, fastapi
1 stars 1 forks source link

30 implement quiz function on texts html #34

Closed mt7180 closed 1 year ago

mt7180 commented 1 year ago

wip: implementing quiz

mt7180 commented 1 year ago

@Zaubeerer : ready for merge, what do you think?

mt7180 commented 1 year ago

I implemented the quiz functionality with respect to the loaded context: the quiz is returned from the quizz route as a structured pydantic BaseModel :tada: I achieved this by using the langchain PydanticOutputParser, which is explicitly referenced by LlamaIndex to use for output parsing. I also tried a sub-query engine with queryEnginetools, but this did not work out since subqueryengine does not support an output parser, yet ... If no context is loaded the backend raises a 400 and the frontend shows an error message with the details of the HttpException