Search function combined with function calling

search function combined with function calling: Suppose I put an accounting procedure manual in the store. In the manual there is a rule for the validity of the posting date, e.g. “posting date must be greater than last closing date”. I ask {“input”; “is the date 05/31/2025 valid?”}. ChatGPT finds the rule in the manual and also sees the function get-last-closing-date.
The function allows it to get last_closing_date and respond
“05/31/2025 violates the rule: date must be greater than last closing date (05/31/2025)”.
This would allow me to transform my code into natural language. I would remove the validation from my code and move it into the chatGPT natural language API.