{"id":13593300,"url":"https://github.com/jagilley/fact-checker","last_synced_at":"2025-04-09T02:33:09.207Z","repository":{"id":65759257,"uuid":"575183014","full_name":"jagilley/fact-checker","owner":"jagilley","description":"Fact-checking LLM outputs with self-ask","archived":false,"fork":false,"pushed_at":"2023-10-23T21:08:13.000Z","size":7,"stargazers_count":284,"open_issues_count":0,"forks_count":40,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-06T14:42:27.723Z","etag":null,"topics":["llm","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jagilley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-12-06T23:58:18.000Z","updated_at":"2024-11-02T11:12:27.000Z","dependencies_parsed_at":"2023-02-08T14:25:11.063Z","dependency_job_id":"67b448e6-a67a-41a2-824c-725e8389c86b","html_url":"https://github.com/jagilley/fact-checker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jagilley%2Ffact-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jagilley%2Ffact-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jagilley%2Ffact-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jagilley%2Ffact-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jagilley","download_url":"https://codeload.github.com/jagilley/fact-checker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247965777,"owners_count":21025435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["llm","python"],"created_at":"2024-08-01T16:01:18.916Z","updated_at":"2025-04-09T02:33:04.170Z","avatar_url":"https://github.com/jagilley.png","language":"Jupyter Notebook","funding_links":[],"categories":["开源项目","Open Source Projects","Jupyter Notebook"],"sub_categories":["其他聊天机器人","Other / Chatbots"],"readme":"# fact checking with prompt chaining\n\nThis repo is a simple demonstration of doing fact-checking with prompt chaining. How it works:\n- you ask your desired LLM a question\n- the LLM generates an initial answer to the question\n- the LLM self-interrogates what the assumptions were that went into that answer\n- the LLM sequentially determines if each of these assumptions are true\n- the LLM generates a new answer to the question, incorporating the new information\n\n## to run\n\nRun\n\n`python3 fact_checker.py 'insert question here'`\n\n*Be sure to wrap your question in quotes if you're passing it as a command line argument.*\n\nAlternatively, you can use the provided `fact_checker.ipynb` notebook.\n\n## example\n\nQuestion: *\"What type of mammal lays the biggest eggs?\"*\n\n\n**Initial answer:**\nThe biggest eggs laid by any mammal belong to the elephant.\n\n**Assumptions made:**\n- The elephant is a mammal \n- Mammals lay eggs \n- Eggs come in different sizes \n- Elephants lay bigger eggs than other mammals\n\n**Verification of assumptions:**\n- The elephant is a mammal: TRUE \n- Mammals lay eggs: FALSE - Most mammals give birth to live young.\n- Eggs come in different sizes: TRUE \n- Elephants lay bigger eggs than other mammals: FALSE - Elephants do not lay eggs.\n\n**New answer:**\nThis question cannot be answered because elephants do not lay eggs and most mammals give birth to live young.\n\n## credits\nProof of concept by [Jasper](https://twitter.com/0xjasper)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjagilley%2Ffact-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjagilley%2Ffact-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjagilley%2Ffact-checker/lists"}