def _filter_atom_infos(
        self, atom_info_candidates: List[AtomRetrievalInfo], chosen_atom_infos: List[AtomRetrievalInfo],
    ) -> List[AtomRetrievalInfo]:
        """Filter the atom information candidates based on the information we already chosen before. Currently we only
        filter out the atom information linked to same source chunk here.
        """
        if len(chosen_atom_infos) == 0:
            return atom_info_candidates

        # Filter out candidate if same chunk
        chosen_chunk_id = set([chosen_info.source_chunk_id for chosen_info in chosen_atom_infos])
        remaining_candidates = []
        for candidate in atom_info_candidates:
            if candidate.source_chunk_id in chosen_chunk_id:
                self._filter_logger.debug(
                    f"\n[filtered Atom] {candidate.atom}"
                    f"\n[Due to same chunk already exist]"
                )
            else:
                remaining_candidates.append(candidate)

        return remaining_candidates
Filter the atom information candidates based on the information we already chosen before. Currently we only
        filter out the atom information linked to same source chunk here.
        
pikerag/workflows/qa_decompose.py