Improve import behavior for rag fallback