Basically, I want a system that reads blobs of text, parses it and stores related chunks and when the user asks a question, it returns with an in-context answer which groups together a bunch of facts. The topic and the initial blob set is hardcoded.

I am noober than a newbie and I don't understand how the chunks would form relationships amongst themselves by logic and not by rule when the inference engine would run and also, how they would be stored together.

Also, if I am trying to reinvent the wheel, I'd be grateful if you could point me to open-source systems that already exist which just take in data and produce answers to questions after having performed some logical operations on it.

Thanks in advance.