r/CausalInference • u/Comfortable_Mall5217 • 4d ago
Extracting candidate causal graphs from text with LLMs
I work on a python tool that extracts candidate causal variables and relationships from plain text using LLMs. It samples multiple outputs and scores relationships by their consistency across samples in order to get what the model think best suits.
There are a lot of limitations on this matter. We extract Knowledge Graphs from text which are supposed to be causal, but there is no way to actually prove real-world causality without human intervention. See, the tool just finds causaly sound graphs, without knowing if they are real world truth. The tool is useful for getting those graphs from text, but an additional human verifcation is 100% required. However, please advise if you have any ideas.
https://github.com/brighk/causal-discovery
there is also a paper of it
https://ieeexplore.ieee.org/document/11635534
and that causal discovery project is part from another project that uses the graphs for fact validation on LLM inference (a more complicated pipeline). You can see that here, if interested
https://github.com/brighk/cauval
