An explicit optimal attribute sampling plan for lot acceptance with maximum allowable expected risks is presented without specifying the full prior model of the defective rate. The suggested methodology to find an approximate solution of the underlying integer nonlinear programming problem is simple, fast and sufficiently accurate in most practical cases. The smallest number of units to be inspected per lot in order to reach the required protections for customers and manufacturers, as well as the maximum tolerable number of defectives in the selected sample, is derived in closed-form using Taylor series expansions of the operating characteristic function. The proposed approach allows the practitioners to determine a nearly optimal inspection scheme using only prior estimations of the means and variances of the defective rates for the acceptable and rejectable lots. Furthermore, it provides easy ways to adequately combine multiple expert opinions and to update the current optimal test plan when new information becomes available. The incorporation of prior knowledge yields considerable savings in sample size, as well as improved evaluations of the current expected producer and consumer risks. Some applications in industrial reliability and quality control are included for illustrative and comparative purposes.