Source-linked AI summary

Verif.ai: Towards an Open-Source Scientific Generative Question-Answering System with Referenced and Verifiable Answers

Miloš Košprdić, Adela Ljajić, Bojana Bašaragin, Darija Medvecki, Nikola Milošević

arXiv:2402.18589v1cs.IRcs.AIcs.CLcs.LG

TL;DR

Scientific language models can generate false or misleading information, creating a trust challenge for their use in research. Verif.ai combines paper retrieval, referenced answer generation, and claim verification; preliminary evaluations report complementary hybrid-search behavior and no clear answer-quality advantage among three compared models.

  • Problem

    Hallucinations can produce false or misleading information, while misinformation creates a trust deficit that hinders scientists’ adoption of language models in accuracy-critical scientific work.

    Source: §I · p. 1
  • Method

    Verif.ai combines lexical and semantic retrieval over PubMed with fine-tuned Mistral 7B answer generation and a verification engine that checks generated claims against their source abstracts or papers.

    Source: §I · p. 1, §II · p. 2, A. Toolbox and Information Retrieval · p. 2
  • Results

    Qualitative evaluation found hybrid search surfaced exact matches and paraphrased or synonymous terms, while manual comparison of 50 questions found no model had a clear answer-quality advantage.

    Source: A. Information retrieval · p. 3, B. Answer generation · p. 3
  • Takeaways & Limitations

    Verif.ai is an open-source project intended to provide referenced, verifiable scientific answers and flag possible hallucinations for users.

    Source: §I · p. 1, §IV · p. 4

    The verification models struggle with numerical differences and complex reasoning or inference over abstracts; a single model may not suffice.

    Source: §IV · p. 4

Abstract

from arXiv · show

In this paper, we present the current progress of the project Verif.ai, an open-source scientific generative question-answering system with referenced and verified answers. The components of the system are (1) an information retrieval system combining semantic and lexical search techniques over scientific papers (PubMed), (2) a fine-tuned generative model (Mistral 7B) taking top answers and generating answers with references to the papers from which the claim was derived, and (3) a verification engine that cross-checks the generated claim and the abstract or paper from which the claim was derived, verifying whether there may have been any hallucinations in generating the claim. We are reinforcing the generative model by providing the abstract in context, but in addition, an independent set of methods and models are verifying the answer and checking for hallucinations. Therefore, we believe that by using our method, we can make scientists more productive, while building trust in the use of generative language models in scientific environments, where hallucinations and misinformation cannot be tolerated.

I. INTRODUCTION

Verif.ai addresses the risk that hallucinations undermine trust in scientific language models by combining scientific-paper retrieval, referenced answer generation, and verification. Its methodology also includes a user interface for reviewing answers and providing feedback.

I. INTRODUCTION

  • Hallucinations can produce false or misleading information, creating a trust deficit that hinders scientists’ adoption of language models in accuracy-critical scientific workflows.The introduction notes that these models could accelerate research and information retrieval, but misinformation threatens their use in scientific work.Source: §I · p. 1
  • Verif.ai is an open-source project intended to mitigate hallucination risk through scientific-paper retrieval, referenced answer generation, and verification of generated claims against their source papers or abstracts.Its retrieval approach uses semantic and lexical techniques, and answer generation uses a fine-tuned Mistral 7B model.Source: §I · p. 1

II. METHODOLOGY

  • The system’s methodology includes a PubMed retrieval engine, a fine-tuned language model that generates answers from retrieved information, a verification engine, and a user interface for review and feedback.The interface also lets users contribute feedback to improve the project.Source: §II · pp. 1–2

A. Toolbox and Information Retrieval

The implemented retrieval engine uses OpenSearch to combine lexical indexing and document embeddings, retrieving relevant papers for the language model.

A. Toolbox and Information Retrieval

  • OpenSearch indexes PubMed articles lexically and stores document embeddings from the MSMARCO model for semantic search.MSMARCO was selected for its ability to handle asymmetric searches, such as queries and searched texts of different lengths.Source: A. Toolbox and Information Retrieval · p. 2
  • Combining lexical and semantic search emphasizes direct matches while also finding semantically similar phrases and text that does not match exactly.Source: A. Toolbox and Information Retrieval · p. 2
  • The system transforms a user question into a query, retrieves the most relevant documents, and passes them to the answer-generating language model.Source: A. Toolbox and Information Retrieval · p. 2

B. Question-answering with references

Verif.ai fine-tunes Mistral 7B to answer PubMed questions using retrieved abstracts and to attach references to claims. Its prompting instructions emphasize factual answers grounded exclusively in those abstracts.

B. Question-answering with references

  • Mistral 7B was instruction-fine-tuned using PubMedQA questions and answers generated by GPT-3.5 with relevant PubMed documents as context.The training dataset used 10,000 randomly selected PubMedQA questions, and the model was fine-tuned with QLoRA.Source: B. Question-answering with references · p. 2
  • The training prompt instructed the model to support answers with research papers and cite the corresponding abstract number in square brackets.Source: B. Question-answering with references · p. 2
  • At inference, the prompt directs Mistral to answer from the retrieved abstracts, reference claims by abstract ID, and use only the provided abstracts.The authors added this instruction after using the same input as training did not produce the expected results; generation used a 1,000-token limit and repetition penalty of 1.1.Source: B. Question-answering with references · p. 2

C. Verifying claims from the generated answer

The verification engine treats each answer statement and its cited article as a natural-language-inference input to models fine-tuned on SciFact. It classifies claims as supported, contradicted, or lacking evidence.

C. Verifying claims from the generated answer

D. User feedback integration

The envisioned interface lets users review answers and potential hallucinations, then submit feedback that can inform future model fine-tuning.

III. PRELIMINARY EVALUATION

The preliminary evaluation was conducted while the project was in its third month, with methodology improvement and web-application development ongoing. On a small set of indexed PubMed articles, hybrid search returned both exact-match and paraphrased or synonymous documents, with exact matches prioritized.

III. PRELIMINARY EVALUATION

  • At the time of the preliminary evaluation, the project was in its third month, and methodology improvements and web-application development were ongoing.Source: §III · p. 3

A. Information retrieval

  • Hybrid search returned documents with exact query matches as well as paraphrases or synonyms, placing exact-match documents above semantic-only matches.Source: A. Information retrieval · p. 3
  • Lexical search could perform better for exact term matches, while semantic search handled paraphrases and synonyms but often did not prioritize exact matches.Source: A. Information retrieval · p. 3
  • The search evaluation was qualitative and used a small set of indexed PubMed articles.Source: A. Information retrieval · p. 3

B. Answer generation

Fine-tuning Mistral 7B improved its referenced question-answering performance to be comparable to much larger GPT-3.5 and GPT-4 models. In a manual comparison on 50 questions, no model showed a clear advantage.

  • Fine-tuned Mistral 7B answers were comparable to those of the larger GPT-3.5 and GPT-4 models on the referenced question-answering task.Source: B. Answer generation · p. 3
  • In a manual comparison of 50 questions, GPT-3.5, GPT-4, and Mistral showed no clear advantage over one another.Source: B. Answer generation · p. 3
  • Answer quality, referenced abstracts, and answer length varied within and among the three models, though they usually cited the same relevant abstracts.Source: B. Answer generation · p. 3

C. Verification and hallucination detection

On SciFact label prediction, the authors report state-of-the-art results against scores in, with DeBERTa-large outperforming RoBERTa-large and their models outperforming zero-shot GPT-4. They describe generated-answer verification as a promising starting point, while noting difficulties with near-word context shifts and slightly different numerical values.

IV. CONCLUSION

Verif.ai is an open-source PubMed-based generative search system with referenced answers and an initial verification model; the paper also reports verification limitations and planned development.

IV. CONCLUSION

  • Verif.ai combines hybrid OpenSearch retrieval, Mistral 7B answer generation, and a fine-tuned DeBERTa-large model for hallucination detection and answer verification.The paper presents this as current project progress and notes that challenges remain.Source: §IV · p. 4
  • The project aims to use user feedback to guide active learning and iterative training for answer generation, verification, and hallucination detection.It also aims to follow developments in smaller, performant open-source language models with larger context sizes.Source: §IV · p. 4
  • The verification model has limitations with numerical values and complex reasoning or inference over abstracts; the authors suggest a mixture of experts may be needed.They also aim to offer multiple verification methods, including explainable approaches and potentially sentence-similarity scores.Source: §IV · p. 4
  • The current system is designed for biomedical use and answers from scientific articles indexed in PubMed, with possible extension to other document formats and search settings.The authors describe personal, organizational, or corporate generative search as potential future uses.Source: §IV · p. 4

V. AVAILABILITY

The project provides its code, models, and further information through online repositories and its website.

V. AVAILABILITY

  • Project code created so far is available on GitHub under the AGPLv3 license.The availability passage also identifies the code repository on GitHub.Source: §V · p. 4
  • The fine-tuned qLoRA adapter for referenced question answering based on Mistral 7B and the verification models are available on HuggingFace.Source: §V · p. 4
  • Further project information is available at the Verif.ai project website.Source: §V · p. 4
Loading 2402.18589v1…