This paper proposes an adaptive context compression (ACC-RAG) framework to address the high inference cost problem in retrieval-augmented generation (RAG). Unlike existing fixed-rate compression methods, ACC-RAG dynamically adjusts the compression ratio according to the complexity of the input question, thereby improving both efficiency and accuracy. Combining a hierarchical compressor and a context selector, it retains only the minimum necessary information, mimicking a human-scanning process. Experimental results using Wikipedia and five question-answering (QA) datasets demonstrate that ACC-RAG outperforms existing fixed-rate compression methods, achieves an inference speed that is more than four times faster than standard RAG, and maintains or improves accuracy.