Is it possible to only allow responses from the LLM with information from the retrieved nodes using LlamaIndex, thus restricting the LLM from responding to general questions that are not in the data sources?
You can modify the prompt templates to be more restrictive. By default the template does try to limit answers only to the retrieved context but sometimes you might need to make it more explicit if you're experiencing it still: https://docs.llamaindex.ai/en/stable/module_guides/models/prompts.html