Sorry man, but I don't have time to code an entire application for you π
If you want to split data by section, you'll probably have to write a parser to split your document into sections, and then make a
Document
object per section
Something like this I suppose?
# get a dict of section name -> text
sections = split_text_into_sections(text)
documents = []
for section_name, text in sections,items():
documents.append(Document(text=text, metadata={'title': section_name}))
If you want to ask questions like those you gave though, you might be better off using a SQL or pandas index? Analyitical question don't work well with semantic search usually π