Refactoring of the i-search part of the prompt.