The process by which activated B cells produce antibodies with increased affinity for antigen during the course of an immune response.