The invention discloses a retrieval enhancement optimization method and
system based on automatic generation of a local
knowledge base report, and provides a reconstruction retrieval enhancement controllable generation architecture which comprises the steps of preprocessing a document, extracting a document structure, removing invalid content, partitioning the document, vectorizing the document and storing the document into a
database; the question reconstruction module is used for disassembling a user question into four parts, namely a retrieval keyword, a user intention, question
rewriting and question expansion; the retrieval enhancement module is used for combining, filtering, reordering, compressing and aligning retrieval results of retrieval keywords by applying a
keyword search method, problem
rewriting and problem expansion by applying a vector semantic retrieval method; and finally, combining a
retrieval result with a user intention, and generating text content based on a local
knowledge base by applying a specific prompt template. According to the method, the unstructured file is subjected to structure
standardization, chart and picture information is extracted,
user input is subjected to disassembly, reconstruction and extension, and a document in a specific format is generated based on local knowledge.