Microbial ecology studies the interactions, population dynamics, and distributions of microbes and their interaction with the environment. Understanding the mechanisms controlling community diversity and functions is an important, but poorly understood, topic in ecology, particularly in microbial ecology. The functions performed by microbial communities are shaped by complex and dynamic interactions between constituent community members and their environment. The bottom-up construction of synthetic microbial community enables the investigation of reduced complexity assemblages with control of initial community composition. However, this is still extremely difficult with the increased number of microbial species. In addition, the stochastic property of the biological systems makes the problem more complicated. Even microbial communities with identical initial abundances of constituent community members in identical growth environments, can demonstrate diverse functions. In this work, we develop an AI-based approach that can predict the conditional probability distribution of a quantitative function/behavior with a limited number of observations per input condition (initial composition and the environment factors). Our work enables the rational design of synthetic microbial communities with possible applications in health, agriculture, and bioprocessing. *This study is supported by the National Science Foundation under Grant No. DBI-1548297.