Connecting NLP Methods in Practice

Connecting NLP Methods in Practice #

Consider a helpdesk assistant asked “Can I carry unused annual leave into next year?” It needs to identify the question, retrieve the right policy, handle possible exceptions and explain an answer the reader can verify.

1. Structure and meaning #

A constituency parse shows that unused annual leave forms a noun phrase. A dependency parse links leave as the object of carry and shows which words modify it. Here leave is a noun meaning authorised time off. A POS tagger narrows the alternatives, and WSD or a contextual embedding helps distinguish this use from the verb in leave next year.

2. Representing evidence #

Use keyword or dense retrieval to locate the relevant policy. If dates, roles and eligibility rules already live in a structured system, use those explicit fields or graph relationships to select the right records. Match the year and policy version before writing the answer.

NeedMethodWhat to inspect
Extract entities and relationshipsTagging, parsing or a contextual encoderCorrect spans and labels
Find an exact policy codeSparse searchRank of the matching passage
Find text that uses different wordingDense or hybrid searchRecall on paraphrased questions
Link the policy to a staff groupMetadata filters or graph queryApplicable group and effective date
Explain the rule and exceptionsGrounded generation or summarisationClaim-by-claim support and citation

3. Diagnosing a wrong answer #

If the assistant gives the wrong carry-forward limit, trace the answer to the cited passage. A correct quotation from an expired policy points to source selection or filtering. A current policy that is retrieved but never reaches the prompt points to ranking or context construction. A prompt with the correct exception followed by an answer that drops it points to generation or summarisation. When changing a component, re-run the cases that showed the problem and check related cases for regressions.

Try it #

Write one question that uses the policy’s exact terms and one paraphrase. Add a question about an exception and a question the policy cannot answer. For each, record the expected evidence, the acceptable answer and whether the assistant should ask for more information.


Home | Natural Language Processing