Skip to content
Discussion options

You must be logged in to vote

The provided code is designed to filter out personally identifiable information (PII) from context strings in a prompt for a question-answering (QA) system using the NERPIINodePostprocessor. Here's a detailed breakdown of what each part of the code does:

  1. PII Processing:

    • The NERPIINodePostprocessor is initialized with a language model (gpt4_llm).
    • The filter_pii_fn function is defined to process nodes containing text and remove any PII before they are included in the prompt. It creates a QueryBundle from the input query string and processes the context string to return a sanitized version.
    pii_processor = NERPIINodePostprocessor(llm=gpt4_llm)
    
    def filter_pii_fn(**kwargs):
        query_bundle

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dosubot
Comment options

Answer selected by mraguth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant