def prepare_context(document_blob: str) -> str: # Generate a semantic summary of the document for the top-of-prompt index summary = generate_summary(document_blob) return f""" {summary} {document_blob} """