def rag_query(
        self,
        query: str,
    ) -> Dict:
        """
        Makes a query to a Vectara corpus and returns the generated summary, the citation metadata, and the factual consistency score.

        Parameters
        ----------
            query (str): The input query from the user.

        Returns
        -------
            Dict: A dictionary containing the generated summary, citation metadata, and the factual consistency score.

        """
        response = self.query_engine._query(query_bundle=QueryBundle(query_str=query))

        if str(response) == "None":
            return {}

        return {
            "summary": response.response,
            "citation_metadata": response.source_nodes,
            "factual_consistency_score": response.metadata["fcs"]
            if "fcs" in response.metadata
            else 0.0,
        }

        Makes a query to a Vectara corpus and returns the generated summary, the citation metadata, and the factual consistency score.

        Parameters
        ----------
            query (str): The input query from the user.

        Returns
        -------
            Dict: A dictionary containing the generated summary, citation metadata, and the factual consistency score.

        
llama-index-integrations/tools/llama-index-tools-vectara-query/llama_index/tools/vectara_query/base.py